Author: dmaliarevich
Date: 2011-11-29 06:49:59 -0500 (Tue, 29 Nov 2011)
New Revision: 36721
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/editor4.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/richEditorToolbar.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/sprites.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4EditorTemplate.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1579/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllImportantTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
Log:
https://issues.jboss.org/browse/JBIDE-10150 - Update some RichFaces 4 components visual
preview
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/editor4.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/editor4.css
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/editor4.css 2011-11-29
11:49:59 UTC (rev 36721)
@@ -0,0 +1,93 @@
+.cke_skin_richfaces {
+ border-color: #C4C0B9;
+ border-style: solid;
+ border-width: 1px;
+ display: block;
+}
+
+.cke_wrapper {
+ overflow: hidden;
+ background-color: #D4CFC7;
+ background-image: url("sprites.png");
+ background-position: 0 -1950px;
+ background-repeat: repeat-x;
+ display: block;
+ padding: 1px;
+}
+
+.cke_editor {
+ display: inline-table;
+ width: 100%;
+}
+
+.cke_toolbox {
+ clear: both;
+ padding-bottom: 1px;
+}
+
+.cke_toolbar {
+ display: block;
+ float: left;
+}
+
+.cke_toolgroup {
+ background-position: 0 -500px;
+ background-repeat: repeat-x;
+ display: inline;
+ float: left;
+ margin-bottom: 5px;
+ margin-right: 6px;
+ padding: 2px;
+}
+
+.cke_editor {
+ display: inline-table;
+ width: 100%;
+}
+
+.cke_toolbox_collapser {
+ background-image: url("sprites.png");
+ background-position: 3px -1366px;
+ background-repeat: no-repeat;
+ border: 1px outset #D3D3D3;
+ cursor: pointer;
+ float: right;
+ height: 11px;
+ margin: 11px 0 2px;
+ width: 11px;
+}
+
+.cke_resizer {
+ background-image: url("sprites.png");
+ background-position: 0 -1428px;
+ background-repeat: no-repeat;
+ cursor: se-resize;
+ display: block;
+ float: right;
+ height: 12px;
+ margin-top: 5px;
+ width: 12px;
+}
+
+.cke_path {
+ display: inline-block;
+ float: left;
+ margin-top: 5px;
+}
+
+.cke_contents {
+ margin: 5px;
+}
+
+.jbds_rf_editor_toolbar_image_internal_css_class {
+ display: block;
+ height:25px;
+ width:200px;
+ background-repeat: no-repeat;
+ background-image: url(richEditorToolbar.png);
+}
+
+.jbds_rf_editor_content_textarea_internal_css_class {
+ height: 100%;
+ width: 100%;
+}
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/richEditorToolbar.png
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/richEditorToolbar.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/sprites.png
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/editor/sprites.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4EditorTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4EditorTemplate.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4EditorTemplate.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class RichFaces4EditorTemplate extends VpeAbstractTemplate {
+
+ private static final String STYLE_PATH = "editor/editor4.css"; //$NON-NLS-1$
+
+ private static final String CSS_CKE_SKIN_RF_CLASS = "cke_skin_richfaces";
//$NON-NLS-1$
+ private static final String CSS_CKE_WRAPPER_CLASS = "cke_wrapper";
//$NON-NLS-1$
+ private static final String CSS_CKE_EDITOR_CLASS = "cke_editor";
//$NON-NLS-1$
+ private static final String CSS_CKE_TOP_CLASS = "cke_top"; //$NON-NLS-1$
+ private static final String CSS_CKE_CONTENTS_CLASS = "cke_contents";
//$NON-NLS-1$
+ private static final String CSS_CKE_BOTTOM_CLASS = "cke_bottom";
//$NON-NLS-1$
+ private static final String CSS_CKE_TOOLBOX_CLASS = "cke_toolbox";
//$NON-NLS-1$
+ private static final String CSS_CKE_TOOLBOX_COLLAPSER_CLASS =
"cke_toolbox_collapser"; //$NON-NLS-1$
+ private static final String CSS_CKE_RESIZER_CLASS = "cke_resizer";
//$NON-NLS-1$
+ private static final String CSS_CKE_PATH_CLASS = "cke_path"; //$NON-NLS-1$
+ private static final String CSS_CKE_TOOLBAR_CLASS = "cke_toolbar";
//$NON-NLS-1$
+ private static final String CSS_CKE_TOOLGROUP_CLASS = "cke_toolgroup";
//$NON-NLS-1$
+ private static final String CSS_TOOLBAR_IMAGE_CLASS =
"jbds_rf_editor_toolbar_image_internal_css_class"; //$NON-NLS-1$
+ private static final String CSS_TEXTAREA_CLASS =
"jbds_rf_editor_content_textarea_internal_css_class"; //$NON-NLS-1$
+
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ Element sourceElement = (Element) sourceNode;
+ /*
+ * Add required css file
+ */
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "editor4"); //$NON-NLS-1$
+
+ nsIDOMElement topSpan = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement spanWrapper = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
+ nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
+ nsIDOMElement tr1 = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement tr2 = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement tr3 = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement td1 = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement td2 = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement td3 = visualDocument.createElement(HTML.TAG_TD);
+ /*
+ * Process Source Element attributes
+ */
+ if (sourceElement.hasAttribute(HTML.ATTR_WIDTH)) {
+ topSpan.setAttribute(HTML.ATTR_STYLE, HTML.ATTR_WIDTH + Constants.COLON +
+ VpeStyleUtil.addPxIfNecessary(sourceElement.getAttribute(HTML.ATTR_WIDTH)));
+ }
+ if (sourceElement.hasAttribute(HTML.ATTR_HEIGHT)) {
+ td2.setAttribute(HTML.ATTR_STYLE, HTML.ATTR_HEIGHT + Constants.COLON +
+ VpeStyleUtil.addPxIfNecessary(sourceElement.getAttribute(HTML.ATTR_HEIGHT)));
+ }
+ /*
+ * TOP ROW
+ */
+ nsIDOMElement divToolbox = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement a = visualDocument.createElement(HTML.TAG_SPAN);
+
+ nsIDOMElement span1 = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement span2 = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement span3img = visualDocument.createElement(HTML.TAG_SPAN);
+ span1.setAttribute(HTML.ATTR_CLASS, CSS_CKE_TOOLBAR_CLASS);
+ span2.setAttribute(HTML.ATTR_CLASS, CSS_CKE_TOOLGROUP_CLASS);
+ span3img.setAttribute(HTML.ATTR_CLASS, CSS_TOOLBAR_IMAGE_CLASS);
+ span2.appendChild(span3img);
+ span1.appendChild(span2);
+ divToolbox.appendChild(span1);
+ divToolbox.appendChild(a);
+ /*
+ * MIDDLE TEXT AREA ROW
+ */
+ nsIDOMElement textArea = visualDocument.createElement(HTML.TAG_TEXTAREA);
+ /*
+ * BOTTOM ROW
+ */
+ nsIDOMElement divResizer = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement divPath = visualDocument.createElement(HTML.TAG_DIV);
+ /*
+ * Add css style classes
+ */
+ topSpan.setAttribute(HTML.ATTR_CLASS, CSS_CKE_SKIN_RF_CLASS);
+ spanWrapper.setAttribute(HTML.ATTR_CLASS, CSS_CKE_WRAPPER_CLASS);
+ table.setAttribute(HTML.ATTR_CLASS, CSS_CKE_EDITOR_CLASS);
+ td1.setAttribute(HTML.ATTR_CLASS, CSS_CKE_TOP_CLASS);
+ td2.setAttribute(HTML.ATTR_CLASS, CSS_CKE_CONTENTS_CLASS);
+ td3.setAttribute(HTML.ATTR_CLASS, CSS_CKE_BOTTOM_CLASS);
+ divToolbox.setAttribute(HTML.ATTR_CLASS, CSS_CKE_TOOLBOX_CLASS);
+ a.setAttribute(HTML.ATTR_CLASS, CSS_CKE_TOOLBOX_COLLAPSER_CLASS);
+ textArea.setAttribute(HTML.ATTR_CLASS, CSS_TEXTAREA_CLASS);
+ divResizer.setAttribute(HTML.ATTR_CLASS, CSS_CKE_RESIZER_CLASS);
+ divPath.setAttribute(HTML.ATTR_CLASS, CSS_CKE_PATH_CLASS);
+ /*
+ * Nesting the elements
+ */
+ td1.appendChild(divToolbox);
+ td1.appendChild(a);
+ td2.appendChild(textArea);
+ td3.appendChild(divResizer);
+ td3.appendChild(divPath);
+ tr1.appendChild(td1);
+ tr2.appendChild(td2);
+ tr3.appendChild(td3);
+ tbody.appendChild(tr1);
+ tbody.appendChild(tr2);
+ tbody.appendChild(tr3);
+ table.appendChild(tbody);
+ spanWrapper.appendChild(table);
+ topSpan.appendChild(spanWrapper);
+ /*
+ * Create VpeCreationData
+ */
+ VpeCreationData creationData = new VpeCreationData(topSpan);
+ return creationData;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -42,13 +42,6 @@
VpeCreationData creationData = new VpeCreationData(mainElement);
return creationData;
}
-
- @Override
- public boolean recreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
}
/**
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -44,6 +44,11 @@
private static final String HEADER = "header"; //$NON-NLS-1$
private static final String HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ private static final String ARROW_TOP = "\u21D1"; //$NON-NLS-1$
+ private static final String ARROW_UP = "\u2191"; //$NON-NLS-1$
+ private static final String ARROW_DOWN = "\u2193"; //$NON-NLS-1$
+ private static final String ARROW_BOTTOM = "\u21D3"; //$NON-NLS-1$
+
private static final String TOP_CONTROL_IMG = "orderingList/top.gif";
//$NON-NLS-1$
private static final String UP_CONTROL_IMG = "orderingList/up.gif";
//$NON-NLS-1$
private static final String DOWN_CONTROL_IMG = "orderingList/down.gif";
//$NON-NLS-1$
@@ -266,7 +271,7 @@
String topControlLabel = sourceElement.hasAttribute(TOP_CONTROL_LABEL) ?
sourceElement.getAttribute(TOP_CONTROL_LABEL) : TOP_CONTROL_LABEL_DEFAULT;
nsIDOMElement btnTopDiv = createSingleButtonDiv(pageContext, creationData,
visualDocument,
- topControlLabel, TOP_CONTROL_IMG, showButtonLabels, top_control_facet,
+ topControlLabel, ARROW_TOP, showButtonLabels, top_control_facet,
CSS_TOP_CONTROL_CLASS, topControlClass);
buttonsDiv.appendChild(btnTopDiv);
@@ -278,10 +283,10 @@
String downControlLabel = sourceElement.hasAttribute(DOWN_CONTROL_LABEL) ?
sourceElement.getAttribute(DOWN_CONTROL_LABEL) : DOWN_CONTROL_LABEL_DEFAULT;
nsIDOMElement btnUpDiv = createSingleButtonDiv(pageContext, creationData,
visualDocument,
- upControlLabel, UP_CONTROL_IMG, showButtonLabels, up_control_facet,
+ upControlLabel, ARROW_UP, showButtonLabels, up_control_facet,
CSS_UP_CONTROL_CLASS, upControlClass);
nsIDOMElement btnDownDiv = createSingleButtonDiv(pageContext, creationData,
visualDocument,
- downControlLabel, DOWN_CONTROL_IMG, showButtonLabels, down_control_facet,
+ downControlLabel, ARROW_DOWN, showButtonLabels, down_control_facet,
CSS_DOWN_CONTROL_CLASS, downControlClass);
buttonsDiv.appendChild(btnUpDiv);
@@ -293,7 +298,7 @@
String bottomControlLabel = sourceElement.hasAttribute(BOTTOM_CONTROL_LABEL) ?
sourceElement.getAttribute(BOTTOM_CONTROL_LABEL) : BOTTOM_CONTROL_LABEL_DEFAULT;
nsIDOMElement btnBottomDiv = createSingleButtonDiv(pageContext, creationData,
visualDocument,
- bottomControlLabel, BOTTOM_CONTROL_IMG, showButtonLabels, bottom_control_facet,
+ bottomControlLabel, ARROW_BOTTOM, showButtonLabels, bottom_control_facet,
CSS_BOTTOM_CONTROL_CLASS, bottomControlClass);
buttonsDiv.appendChild(btnBottomDiv);
@@ -309,7 +314,7 @@
* @param creationData the creation data
* @param visualDocument the visual document
* @param btnName the btn name
- * @param imgName the img name
+ * @param arrowName the img name
* @param showButtonLabels the show button labels
* @param buttonFacet the button facet
* @param cssStyleName the css style name
@@ -318,15 +323,15 @@
* @return the element
*/
private nsIDOMElement createSingleButtonDiv(final VpePageContext pageContext,
VpeCreationData creationData,
- nsIDOMDocument visualDocument, String btnName, String imgName,
+ nsIDOMDocument visualDocument, String btnName, String arrowName,
boolean showButtonLabels, Element buttonFacet, String cssStyleName,
String customStyleClass) {
nsIDOMElement div1 = visualDocument.createElement(HTML.TAG_DIV);
nsIDOMElement div2 = visualDocument.createElement(HTML.TAG_DIV);
- nsIDOMElement a = visualDocument.createElement(HTML.TAG_A);
+// nsIDOMElement a = visualDocument.createElement(HTML.TAG_A);
nsIDOMElement div3 = visualDocument.createElement(HTML.TAG_DIV);
- nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
+// nsIDOMElement arrowImg = visualDocument.createElement(HTML.TAG_IMG);
div1.setAttribute(HTML.ATTR_CLASS,
"dr-buttons-border" + " " + cssStyleName //$NON-NLS-1$
//$NON-NLS-2$
@@ -349,18 +354,21 @@
/*
* Creating button with image and label
*/
- ComponentUtil.setImg(img, imgName);
- img.setAttribute(HTML.ATTR_WIDTH, "15"); //$NON-NLS-1$
- img.setAttribute(HTML.ATTR_HEIGHT, "15"); //$NON-NLS-1$
- div3.appendChild(img);
+// ComponentUtil.setImg(arrowImg, arrowName);
+// arrowImg.setAttribute(HTML.ATTR_WIDTH, "15"); //$NON-NLS-1$
+// arrowImg.setAttribute(HTML.ATTR_HEIGHT, "15"); //$NON-NLS-1$
+// div3.appendChild(arrowImg);
if (showButtonLabels) {
- div3.appendChild(visualDocument.createTextNode(btnName));
+ div3.appendChild(visualDocument.createTextNode(arrowName
+ + Constants.WHITE_SPACE + btnName));
+ } else {
+ div3.appendChild(visualDocument.createTextNode(arrowName));
}
- a.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_SELECTION_CLASS);
- div3.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_CONTENT_CLASS);
- a.appendChild(div3);
- div2.appendChild(a);
+// a.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_SELECTION_CLASS);
+// a.appendChild(div3);
+ div3.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_SELECTION_CLASS + " " +
CSS_BUTTON_CONTENT_CLASS); //$NON-NLS-1$
+ div2.appendChild(div3);
}
return div1;
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -185,6 +185,11 @@
/** value of width attribute of target list. */
private String targetListsWidth;
+ private static final String REMOVE_ALL_CONTROL = "\u21D0"; //$NON-NLS-1$
+ private static final String REMOVE_CONTROL = "\u2190"; //$NON-NLS-1$
+ private static final String COPY_CONTROL = "\u2192"; //$NON-NLS-1$
+ private static final String COPY_ALL_CONTROL = "\u21D2"; //$NON-NLS-1$
+
private enum LabelKey {
COPY_ALL_CONTROL("copyAllControl"), //$NON-NLS-1$
COPY_CONTROL("copyControl"), //$NON-NLS-1$
@@ -400,17 +405,18 @@
nsIDOMElement buttonContent = visualDocument.createElement(HTML.TAG_DIV);
buttonContent.setAttribute(HTML.ATTR_CLASS,
RICH_LIST_PICKLIST_BUTTON_CONTENT_CSS_CLASS);
- nsIDOMElement buttonImage = visualDocument.createElement(HTML.TAG_IMG);
+// nsIDOMElement buttonImage = visualDocument.createElement(HTML.TAG_IMG);
+// buttonImage.setAttribute(HTML.ATTR_WIDTH, WIDTH_15);
+// buttonImage.setAttribute(HTML.ATTR_HEIGHT, WIDTH_15);
+// ComponentUtil.setImg(buttonImage, buttonImages.get(buttonId));
+// buttonContent.appendChild(buttonImage);
- buttonImage.setAttribute(HTML.ATTR_WIDTH, WIDTH_15);
- buttonImage.setAttribute(HTML.ATTR_HEIGHT, WIDTH_15);
- ComponentUtil.setImg(buttonImage, buttonImages.get(buttonId));
- buttonContent.appendChild(buttonImage);
-
if (isShowButtonLabels) {
- nsIDOMText buttonText =
visualDocument.createTextNode(labels.get(buttonId.getValue()));
-
- buttonContent.appendChild(buttonText);
+ buttonContent.appendChild(visualDocument.createTextNode(
+ buttonImages.get(buttonId) + " " +
labels.get(buttonId.getValue()))); //$NON-NLS-1$
+ } else {
+ buttonContent.appendChild(visualDocument.createTextNode(
+ buttonImages.get(buttonId)));
}
buttonSpace.appendChild(metaButton);
@@ -517,11 +523,16 @@
*/
private void initButtonImagesMap() {
// images of the first set of buttons
- buttonImages.put(LabelKey.COPY_ALL_CONTROL, getCssExtension() +
"/arrow_copy_all.gif"); //$NON-NLS-1$
- buttonImages.put(LabelKey.COPY_CONTROL, getCssExtension() +
"/arrow_copy.gif"); //$NON-NLS-1$
- buttonImages.put(LabelKey.REMOVE_CONTROL, getCssExtension() +
"/arrow_remove.gif"); //$NON-NLS-1$
- buttonImages.put(LabelKey.REMOVE_ALL_CONTROL, getCssExtension() +
"/arrow_remove_all.gif"); //$NON-NLS-1$
+// buttonImages.put(LabelKey.COPY_ALL_CONTROL, getCssExtension() +
"/arrow_copy_all.gif"); //$NON-NLS-1$
+// buttonImages.put(LabelKey.COPY_CONTROL, getCssExtension() +
"/arrow_copy.gif"); //$NON-NLS-1$
+// buttonImages.put(LabelKey.REMOVE_CONTROL, getCssExtension() +
"/arrow_remove.gif"); //$NON-NLS-1$
+// buttonImages.put(LabelKey.REMOVE_ALL_CONTROL, getCssExtension() +
"/arrow_remove_all.gif"); //$NON-NLS-1$
+ buttonImages.put(LabelKey.COPY_ALL_CONTROL, COPY_ALL_CONTROL);
+ buttonImages.put(LabelKey.COPY_CONTROL, COPY_CONTROL);
+ buttonImages.put(LabelKey.REMOVE_CONTROL, REMOVE_CONTROL);
+ buttonImages.put(LabelKey.REMOVE_ALL_CONTROL, REMOVE_ALL_CONTROL);
+
}
/**
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2011-11-29
11:49:59 UTC (rev 36721)
@@ -314,7 +314,7 @@
<vpe:tag name="rich:editor" case-sensitive="yes">
<vpe:if test="tld_version('min=3.3')">
<vpe:template children="no" modify="no"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesEditorTemplate">
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFaces4EditorTemplate">
<vpe:resize>
<vpe:width width-attr="width" />
<vpe:height height-attr="height" />
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml 2011-11-29
11:49:59 UTC (rev 36721)
@@ -8,11 +8,11 @@
<head>
</head>
<body>
-<rich:panel id="editor">
+<rich:panel>
<f:facet name="header">
<h:outputText value="Editor" />
</f:facet>
- <rich:editor width="264" height="200"
+ <rich:editor width="264" height="200" id="editor"
style="width:500; background-color:red">
</rich:editor>
</rich:panel>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml.xml 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.xhtml.xml 2011-11-29
11:49:59 UTC (rev 36721)
@@ -1,43 +1,40 @@
<tests>
<test id="editor">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Editor
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN CLASS="richfacesSimpleSkin" STYLE="display: table;
background-color: red;">
- <TABLE CELLSPACING="0" CELLPADDING="0"
CLASS="mceLayout"
- STYLE="width: 264px; height: 200px;">
- <TR STYLE="height: 100%;">
- <TD>
- <DIV CLASS="mceIframeContainer" STYLE="height: 100%;">
- <TABLE BORDER="0" STYLE="width: 100%; height: 100%;">
- <TR>
- <TD>
- </TD>
- </TR>
- </TABLE>
+ <SPAN STYLE="width: 264px;" CLASS="cke_skin_richfaces">
+ <SPAN CLASS="cke_wrapper">
+ <TABLE CLASS="cke_editor">
+ <TBODY>
+ <TR>
+ <TD CLASS="cke_top">
+ <DIV CLASS="cke_toolbox">
+ <SPAN CLASS="cke_toolbar">
+ <SPAN CLASS="cke_toolgroup">
+ <SPAN
CLASS="jbds_rf_editor_toolbar_image_internal_css_class">
+ </SPAN>
+ </SPAN>
+ </SPAN>
</DIV>
+ <SPAN CLASS="cke_toolbox_collapser">
+ </SPAN>
</TD>
</TR>
<TR>
- <TD CLASS="mceToolbar">
- <TABLE CELLSPACING="0" CELLPADDING="0"
CLASS="mceToolbarTable">
- <TR>
- <TD>
- <DIV CLASS="mce_panel">
- </DIV>
- </TD>
- </TR>
- </TABLE>
+ <TD STYLE="height: 200px;" CLASS="cke_contents">
+ <TEXTAREA
CLASS="jbds_rf_editor_content_textarea_internal_css_class">
+ </TEXTAREA>
</TD>
</TR>
- </TABLE>
- </SPAN>
- </DIV>
- </DIV>
+ <TR>
+ <TD CLASS="cke_bottom">
+ <DIV CLASS="cke_resizer">
+ </DIV>
+ <DIV CLASS="cke_path">
+ </DIV>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </SPAN>
+ </SPAN>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2011-11-29
11:49:59 UTC (rev 36721)
@@ -1,6 +1,5 @@
<tests>
<test id="orderingList">
-
<TABLE WIDTH="300px" HEIGHT="200px"
CLASS="rich-ordering-list-body">
<TBODY>
<TR>
@@ -52,49 +51,33 @@
<DIV CLASS="dr-buttons-border rich-ordering-control-top">
<DIV CLASS="rich-ordering-list-button"
STYLE="/width: 100%; background-image:
url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/top.gif/" />
- First
+ <DIV CLASS="rich-ordering-list-button-selection
rich-ordering-list-button-content">
+ ⇑ First
</DIV>
- </A>
</DIV>
</DIV>
<DIV CLASS="dr-buttons-border rich-ordering-control-up">
<DIV CLASS="rich-ordering-list-button"
STYLE="/width: 100%; background-image:
url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/up.gif/" />
- Up
+ <DIV CLASS="rich-ordering-list-button-selection
rich-ordering-list-button-content">
+ ↑ Up
</DIV>
- </A>
</DIV>
</DIV>
<DIV CLASS="dr-buttons-border rich-ordering-control-down">
<DIV CLASS="rich-ordering-list-button"
STYLE="/width: 100%; background-image:
url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/down.gif/" />
- Down
+ <DIV CLASS="rich-ordering-list-button-selection
rich-ordering-list-button-content">
+ ↓ Down
</DIV>
- </A>
</DIV>
</DIV>
<DIV CLASS="dr-buttons-border rich-ordering-control-bottom">
<DIV CLASS="rich-ordering-list-button"
STYLE="/width: 100%; background-image:
url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/bottom.gif/" />
- Last
+ <DIV CLASS="rich-ordering-list-button-selection
rich-ordering-list-button-content">
+ ⇓ Last
</DIV>
- </A>
</DIV>
</DIV>
</DIV>
@@ -103,4 +86,76 @@
</TBODY>
</TABLE>
</test>
+
+ <test id="orderingList1">
+ <TABLE WIDTH="300px" HEIGHT="200px"
CLASS="rich-ordering-list-body">
+ <TBODY>
+ <TR>
+ <TD CLASS="rich-ordering-list-caption">
+ <DIV>
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV STYLE="overflow: scroll;"
+ CLASS="rich-ordering-list-output rich-ordering-list-content">
+ <TABLE CELLSPACING="1" CLASS="rich-ordering-list-items "
+ ID="orderingList1" LISTHEIGHT="300" LISTWIDTH="350"
STYLE="width: 100%;">
+ <THEAD>
+ <TR
+ CLASS="rich-ordering-list-header rich-ordering-list-table-header
">
+ <TD
BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
+ CLASS="rich-ordering-list-table-header-cell ">
+ <SPAN CLASS="vpe-text">
+ Song Name
+</SPAN>
+ </TD>
+ <TD
BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
+ CLASS="rich-ordering-list-table-header-cell ">
+ <SPAN CLASS="vpe-text">
+ Artist Name
+</SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TR CLASS="rich-ordering-list-row">
+ <TD WIDTH="180" CLASS="dr-table-cell
rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ You must be evil
+</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+</SPAN>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD ALIGN="center"
CLASS="rich-ordering-list-button-valign">
+ <DIV CLASS="rich-ordering-controls
rich-ordering-list-button-layout">
+ <DIV CLASS="dr-buttons-border rich-ordering-control-up">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image:
url\(.*resources/orderingList/button_bg.gif\);/">
+ <DIV CLASS="rich-ordering-list-button-selection
rich-ordering-list-button-content">
+ ↑ Up
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-down">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image:
url\(.*resources/orderingList/button_bg.gif\);/">
+ <DIV CLASS="rich-ordering-list-button-selection
rich-ordering-list-button-content">
+ ↓ Down
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </test>
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2011-11-29
11:49:59 UTC (rev 36721)
@@ -36,39 +36,28 @@
<DIV CLASS="rich-picklist-control-button-class">
<DIV STYLE="/.*/resources/pickList/button.gif/"
CLASS="rich-list-picklist-button">
<DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
SRC="/.*/pickList/arrow_copy_all.gif/" />
-
- Copy all
+ ⇒ Copy all
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-picklist-control-button-class">
<DIV STYLE="/.*/resources/pickList/button.gif/"
CLASS="rich-list-picklist-button">
<DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/resources/pickList/arrow_copy.gif/" />
-
- Copy
+ → Copy
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-picklist-control-button-class">
<DIV STYLE="/.*/resources/pickList/button.gif/"
CLASS="rich-list-picklist-button">
<DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/resources/pickList/arrow_remove.gif/" />
-
- Remove
+ ← Remove
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-picklist-control-button-class">
<DIV STYLE="/.*/resources/pickList/button.gif/"
CLASS="rich-list-picklist-button">
<DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/resources/pickList/arrow_remove_all.gif/" />
-
- Remove All
+ ⇐ Remove All
</DIV>
</DIV>
</DIV>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllImportantTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllImportantTests.java 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllImportantTests.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -1,6 +1,5 @@
package org.jboss.tools.jsf.vpe.richfaces.test;
-import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1579Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1606Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1613Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1713Test;
@@ -25,7 +24,6 @@
TestSuite suite = new TestSuite(
RichFacesAllImportantTests.class.getName());
//$JUnit-BEGIN$
- suite.addTestSuite(JBIDE1579Test.class);
suite.addTestSuite(Jbide1580Test.class);
suite.addTestSuite(JBIDE1613Test.class);
suite.addTestSuite(Jbide1614Test.class);
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -80,10 +80,7 @@
elements.clear();
TestUtil.findAllElementsByName(element, elements, HTML.TAG_DIV);
assertEquals("Count of divs should be 15", 15, elements.size());
//$NON-NLS-1$
-
elements.clear();
- TestUtil.findAllElementsByName(element, elements, HTML.TAG_IMG);
- assertEquals("Count of img should be 4", 4, elements.size());
//$NON-NLS-1$
}
}
Deleted:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java 2011-11-29
11:38:37 UTC (rev 36720)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java 2011-11-29
11:49:59 UTC (rev 36721)
@@ -1,93 +0,0 @@
-package org.jboss.tools.jsf.vpe.richfaces.test.jbide;
-
-import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
-import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
-import org.jboss.tools.vpe.base.test.TestUtil;
-import org.jboss.tools.vpe.base.test.VpeTest;
-import org.jboss.tools.vpe.editor.VpeController;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-
-public class JBIDE1579Test extends VpeTest {
-
- private static final String TEST_PAGE_NAME_2BUTTONS =
"JBIDE/1579/JBIDE-1579-2buttons.xhtml";
- private static final String TEST_PAGE_NAME_4BUTTONS =
"JBIDE/1579/JBIDE-1579-4buttons.xhtml";
- private static final String TEST_ELEMENT_ID = "testElement";
-
- public JBIDE1579Test(String name) {
- super(name);
- }
-
- public void testJBIDE_1579_2buttons() throws Throwable{
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_NAME_2BUTTONS, RichFacesAllTests.IMPORT_PROJECT_NAME);
-
- assertNotNull("Could not open specified file. componentPage = " +
TEST_PAGE_NAME_2BUTTONS//$NON-NLS-1$
- + ";projectName = " + RichFacesAllTests.IMPORT_PROJECT_NAME,
file);//$NON-NLS-1$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input);
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
- VpeController controller = TestUtil.getVpeController(part);
-
- nsIDOMElement element = findElementById(controller, TEST_ELEMENT_ID);
-
- //check that element is not null
- assertNotNull(element);
-
- // get root node
- nsIDOMNode node = queryInterface(element, nsIDOMNode.class);
-
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
- // find "img" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_IMG);
- assertEquals(2, elements.size());
-
- }
-
- public void testJBIDE_1579_4buttons() throws Throwable{
-
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_NAME_4BUTTONS, RichFacesAllTests.IMPORT_PROJECT_NAME);
-
- assertNotNull("Could not open specified file. componentPage = " +
TEST_PAGE_NAME_4BUTTONS//$NON-NLS-1$
- + ";projectName = " + RichFacesAllTests.IMPORT_PROJECT_NAME,
file);//$NON-NLS-1$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input);
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
- VpeController controller = TestUtil.getVpeController(part);
-
- nsIDOMElement element = findElementById(controller, TEST_ELEMENT_ID);
-
- //check that element is not null
- assertNotNull(element);
-
- // get root node
- nsIDOMNode node = queryInterface(element, nsIDOMNode.class);
-
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
- // find "img" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_IMG);
- assertEquals(4, elements.size());
-
- }
-
-}