Author: izhukov
Date: 2008-12-11 11:28:37 -0500 (Thu, 11 Dec 2008)
New Revision: 12551
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.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/inplaceInput.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-12-11
16:28:37 UTC (rev 12551)
@@ -9,19 +9,14 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-
package org.jboss.tools.jsf.vpe.richfaces.template;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
@@ -35,7 +30,6 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
/**
* Base class for both {@link RichFacesInplaceInputTemplate} and {@link
* RichFacesInplaceSelectTemplate}.
@@ -46,16 +40,6 @@
*/
public abstract class RichFacesAbstractInplaceTemplate extends AbstractRichFacesTemplate
implements VpeToggableTemplate {
- /**
- *
- */
- protected static final String CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE =
"center"; //$NON-NLS-1$
-
- /**
- *
- */
- private static final String CONTROLS_HORIZONTAL_POSITION_DEFAULT_VALUE =
"right"; //$NON-NLS-1$
-
/** The Constant APPLY_BUTTON_GIF. */
protected static final String APPLY_BUTTON_GIF = "/applyButton.gif";
//$NON-NLS-1$
@@ -68,9 +52,6 @@
/** The Constant DEFAULT_INPUT_WIDTH_VALUE. */
protected static final String DEFAULT_INPUT_WIDTH_VALUE = "66px";
//$NON-NLS-1$
- /** The Constant DEFAULT_NULL_VALUE. */
- protected static final String DEFAULT_NULL_VALUE = " "; //$NON-NLS-1$
-
/** The Constant DEFAULT_VERTICAL_POSITION. */
protected static final String DEFAULT_VERTICAL_POSITION = null;
@@ -88,6 +69,8 @@
private static final String DEFAULT_LAYOUT = "inline"; //$NON-NLS-1$
+ private static final String ALTERNATE_LAYOUT = "block"; //$NON-NLS-1$
+
/** The button images. */
protected final Map<String, String> buttonImages = new HashMap<String,
String>();
@@ -105,10 +88,8 @@
/** The edit class. */
protected String editClass;
-
/** The view class. */
protected String viewClass;
-
/** The control class. */
protected String controlClass;
@@ -122,18 +103,16 @@
protected String sourceValue;
/** The Constant SPACER_GIF. */
- protected final String SPACER_GIF = getCssExtension()+"/spacer.gif";
//$NON-NLS-1$
+ protected final String SPACER_GIF = getCssExtension() + "/spacer.gif";
//$NON-NLS-1$
/** The style class. */
protected String styleClass;
-
+
protected String sourceCancelButtonIcon;
-
protected String sourceApplyButtonIcon;
-
+
protected String sourceLayout;
-
-
+
/**
* The Constructor.
*/
@@ -144,18 +123,15 @@
initPositions();
}
-
-
/**
* Creates the root span template method.
- *
+ *
* @param visualDocument the visual document
* @param source the source
- *
* @return the ns IDOM element
*/
protected nsIDOMElement createRootSpanTemplateMethod(Element source, nsIDOMDocument
visualDocument) {
- final nsIDOMElement rootSpan =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ final nsIDOMElement rootSpan = visualDocument.createElement(HTML.TAG_SPAN);
// if(!(this.showControls && this.isToggle)){
rootSpan.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(this.isToggle));
// }
@@ -163,110 +139,102 @@
String rootStyleClass = "rich-inplace" + getCssStylesSuffix();
//$NON-NLS-1$
for (String sc : getRootSpanClasses()) {
if (ComponentUtil.isNotBlank(sc)) {
- rootStyleClass += " " + sc; //$NON-NLS-1$
- }
- }
+ rootStyleClass += Constants.WHITE_SPACE + sc;
+ }
+ }
rootSpan.setAttribute(HTML.ATTR_CLASS, rootStyleClass);
- String style = ""; //$NON-NLS-1$
+ String style = Constants.EMPTY;
if (this.isToggle) {
style = "position: relative;"; //$NON-NLS-1$
}
- rootSpan.setAttribute(HTML.ATTR_STYLE, style + ";
display:"+this.sourceLayout+"; "); //$NON-NLS-1$ //$NON-NLS-2$
+ rootSpan.setAttribute(HTML.ATTR_STYLE, style + "; display:" +
this.sourceLayout + Constants.SEMICOLON); //$NON-NLS-1$
return rootSpan;
-
}
-
/**
* Gets the css extension.
- *
+ *
* @return the css extension
*/
protected abstract String getCssExtension();
/**
* Gets the css style.
- *
+ *
* @return the css style
*/
protected abstract String getCssStyle();
/**
* Gets the css styles suffix.
- *
+ *
* @return the css styles suffix
*/
protected abstract String getCssStylesSuffix();
/**
* Gets the root span classes.
- *
+ *
* @return the root span classes
*/
protected abstract String[] getRootSpanClasses();
/**
* Gets the value.
- *
+ *
* @return the value
*/
protected String getValue() {
- String rst = ""; //$NON-NLS-1$
+ String rst = Constants.EMPTY;
if (ComponentUtil.isNotBlank(this.defaultLabel)) {
rst = this.defaultLabel;
} else if (ComponentUtil.isBlank(this.defaultLabel) &&
ComponentUtil.isNotBlank(this.sourceValue)) {
rst = this.sourceValue;
} else {
- rst = DEFAULT_NULL_VALUE;
+ rst = Constants.WHITE_SPACE;
}
return rst;
}
/**
- * Inits the default button images.
+ * Initialize the default button images.
*/
protected void initDefaultButtonImages() {
if (defaultButtonImages.isEmpty()) {
defaultButtonImages.put("cancelControlIcon", getCssExtension() +
CANCEL_BUTTON_GIF); //$NON-NLS-1$
defaultButtonImages.put("saveControlIcon", getCssExtension() +
APPLY_BUTTON_GIF); //$NON-NLS-1$
}
-
}
/**
- * Inits the default style classes.
+ * Initialize the default style classes.
*/
protected void initDefaultStyleClasses() {
if (defaultStyleClasses.isEmpty()) {
defaultStyleClasses.put("rootSpan", "rich-inplace" +
getCssStylesSuffix() + " {0} {1}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-
}
/**
- * Inits the positions.
+ * Initialize the positions.
*/
protected void initPositions() {
if (controlsVerticalPositions.isEmpty()) {
- controlsVerticalPositions.put("bottom", "18px");
//$NON-NLS-1$ //$NON-NLS-2$
- controlsVerticalPositions.put("top", "-12px");
//$NON-NLS-1$ //$NON-NLS-2$
- controlsVerticalPositions.put(CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE,
"0px"); //$NON-NLS-1$
+ controlsVerticalPositions.put(HTML.VALUE_ALIGN_BOTTOM, "18px");
//$NON-NLS-1$
+ controlsVerticalPositions.put(HTML.VALUE_ALIGN_TOP, "-12px");
//$NON-NLS-1$
+ controlsVerticalPositions.put(HTML.VALUE_ALIGN_CENTER, "0px");
//$NON-NLS-1$
}
if (controlsHorizontalPositions.isEmpty()) {
- controlsHorizontalPositions.put("left", "0px");
//$NON-NLS-1$ //$NON-NLS-2$
- controlsHorizontalPositions.put(CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE,
"53px"); //$NON-NLS-1$
+ controlsHorizontalPositions.put(HTML.VALUE_ALIGN_LEFT, "0px");
//$NON-NLS-1$
+ controlsHorizontalPositions.put(HTML.VALUE_ALIGN_CENTER, "53px");
//$NON-NLS-1$
}
}
/**
* Checks if is in key set.
- *
- * @param controlsVerticalPosition2 *
- * param value2 the value2
- * @param value2 the value2
+ *
* @param map the map
- * @param controlsVerticalPositions2 *
- *
+ * @param value2 the value2
* @return true, if is in key set
*/
protected boolean isInKeySet(Map<String, String> map, String value2) {
@@ -281,27 +249,8 @@
}
/**
- * Checks if is recreate at attr change.
- *
- * @param sourceElement the source element
- * @param value the value
- * @param visualDocument the visual document
- * @param visualNode the visual node
- * @param data the data
- * @param pageContext the page context
- * @param name the name
- *
- * @return true, if is recreate at attr change
- */
- @Override
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element
sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
-
- /**
* Prepare data.
- *
+ *
* @param source the source
*/
protected void prepareData(VpePageContext pageContext,Element source) {
@@ -312,12 +261,12 @@
this.sourceValue = source.getAttribute(RichFaces.ATTR_VALUE);
this.sourceLayout = ComponentUtil.getAttribute(source, "layout");
//$NON-NLS-1$
if(ComponentUtil.isBlank(this.sourceLayout) ||
(!this.sourceLayout.equalsIgnoreCase(DEFAULT_LAYOUT) &&
- !this.sourceLayout.equalsIgnoreCase("block")) ){ //$NON-NLS-1$
+ !this.sourceLayout.equalsIgnoreCase(ALTERNATE_LAYOUT)) ) {
this.sourceLayout = DEFAULT_LAYOUT;
}
this.defaultLabel = source.getAttribute("defaultLabel"); //$NON-NLS-1$
if (ComponentUtil.isBlank(this.sourceValue)) {
- this.sourceValue = DEFAULT_NULL_VALUE;
+ this.sourceValue = Constants.WHITE_SPACE;
}
// if ((source.getAttributeNode("value") != null) &&
ComponentUtil.isNotBlank(this.sourceValue)
// && (this.sourceValue != DEFAULT_NULL_VALUE) &&
this.sourceValue.startsWith("#{")) {
@@ -332,68 +281,63 @@
this.showControls =
Boolean.parseBoolean(source.getAttribute("showControls")); //$NON-NLS-1$
this.controlsVerticalPosition =
source.getAttribute("controlsVerticalPosition"); //$NON-NLS-1$
if (ComponentUtil.isBlank(this.controlsVerticalPosition) ||
!isInKeySet(controlsVerticalPositions, this.controlsVerticalPosition)) {
- this.controlsVerticalPosition = CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE;
+ this.controlsVerticalPosition = HTML.VALUE_ALIGN_CENTER;
}
this.controlsHorizontalPosition =
source.getAttribute("controlsHorizontalPosition"); //$NON-NLS-1$
if (ComponentUtil.isBlank(this.controlsHorizontalPosition)
|| !isInKeySet(controlsHorizontalPositions,
this.controlsHorizontalPosition)) {
- this.controlsHorizontalPosition =
CONTROLS_HORIZONTAL_POSITION_DEFAULT_VALUE;
+ this.controlsHorizontalPosition = HTML.VALUE_ALIGN_RIGHT;
}
prepareImages(source);
-
}
/**
* Prepare images.
- *
+ *
* @param source the source
*/
protected void prepareImages(Element source) {
for (String key : defaultButtonImages.keySet()) {
String value = ComponentUtil.getAttribute(source, key);
- if(ComponentUtil.isNotBlank(value)){
+ if(ComponentUtil.isNotBlank(value)) {
this.buttonImages.put(key, value);
- }else{
+ } else {
this.buttonImages.put(key, defaultButtonImages.get(key));
}
}
-
}
/**
* Read attributes.
- *
+ *
* @param source the source
*/
protected void readAttributes(Element source) {
this.styleClass = ComponentUtil.getAttribute(source,
RichFaces.ATTR_STYLE_CLASS);
this.sourceValue = ComponentUtil.getAttribute(source, RichFaces.ATTR_VALUE);
-
}
-
/**
- * Sets the up img.
- *
- * @param i * @param width the width
- * @param height the height
+ * Sets the up image.
+ *
* @param img the img
+ * @param width the width
+ * @param height the height
+ * @param border the border
* @param image the image
- * @param j * @param border the border
- * @param td1Img */
+ */
protected void setUpImg(nsIDOMElement img, int width, int height, int border, String
image) {
ComponentUtil.setImg(img, image);
img.setAttribute(HTML.ATTR_WIDTH, String.valueOf(width));
img.setAttribute(HTML.ATTR_HEIGHT, String.valueOf(height));
img.setAttribute(HTML.ATTR_BORDER, String.valueOf(border));
-
}
/**
* Sets the up span root.
- *
+ *
* @param visualDocument the visual document
* @param spanRoot the span root
* @param source the source
@@ -404,23 +348,19 @@
} else {
spanRoot.setAttribute(HTML.ATTR_CLASS,
RICH_INPLACE_VIEW_DEFAULT_STYLE_CLASS);
}
- String value = DEFAULT_NULL_VALUE;
+ String value = Constants.WHITE_SPACE;
if (this.sourceValue.length() > 0) {
value = this.sourceValue;
}
final nsIDOMText text = visualDocument.createTextNode(value);
spanRoot.appendChild(text);
}
-
/**
* Stop toggling.
- *
+ *
* @param sourceNode the source node
- *
- * @see
- * org.jboss.tools.vpe.editor.template.VpeToggableTemplate#stopToggling(
- * org.w3c.dom.Node)
+ * @see
org.jboss.tools.vpe.editor.template.VpeToggableTemplate#stopToggling(org.w3c.dom.Node)
*/
public void stopToggling(Node sourceNode) {
this.isToggle = false;
@@ -428,36 +368,31 @@
/**
* Toggle.
- *
+ *
* @param builder the builder
* @param sourceNode the source node
* @param toggleId the toggle id
- *
- * @see
- * org.jboss.tools.vpe.editor.template.VpeToggableTemplate#toggle(org.jboss
- * .tools.vpe.editor.VpeVisualDomBuilder, org.w3c.dom.Node,
- * java.lang.String)
+ *
+ * @see org.jboss.tools.vpe.editor.template.VpeToggableTemplate#toggle(
+ * org.jboss.tools.vpe.editor.VpeVisualDomBuilder, org.w3c.dom.Node,
java.lang.String)
*/
public void toggle(VpeVisualDomBuilder builder, Node sourceNode, String toggleId) {
isToggle = !isToggle;
-
}
-
+
protected abstract String getCssStylesControlSuffix();
-
-
+
protected abstract String getControlPositionsSubStyles();
-
+
protected abstract String getMainControlsDivCssClass();
-
/**
* Creates the controls div.
- *
+ *
* @param visualDocument the visual document
* @param sourceNode the source node
* @param pageContext the page context
- *
+ * @param creationData the VpeCreationData object
* @return the ns IDOM element
*/
protected nsIDOMElement createControlsDiv(VpePageContext pageContext,
@@ -469,7 +404,7 @@
element.setAttribute(HTML.ATTR_STYLE, "position: absolute; " +
getControlPositionsSubStyles()); //$NON-NLS-1$
final nsIDOMElement divShadov = visualDocument.createElement(HTML.TAG_DIV);
- divShadov.setAttribute(HTML.ATTR_CLASS,
"rich-inplace"+getCssStylesSuffix()+"-shadow"); //$NON-NLS-1$
//$NON-NLS-2$
+ divShadov.setAttribute(HTML.ATTR_CLASS, "rich-inplace" +
getCssStylesSuffix() + "-shadow"); //$NON-NLS-1$ //$NON-NLS-2$
final nsIDOMElement divShadovTable =
visualDocument.createElement(HTML.TAG_TABLE);
divShadovTable.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
divShadovTable.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
@@ -490,11 +425,11 @@
setUpImg(td2Img, 1, 10, 0, SPACER_GIF);
setUpImg(td3Img, 1, 10, 0, SPACER_GIF);
setUpImg(td4Img, 10, 1, 0, SPACER_GIF);
- divShadovTd1.setAttribute(HTML.ATTR_CLASS,
"rich-inplace"+getCssStylesSuffix()+"-shadow-tl"); //$NON-NLS-1$
//$NON-NLS-2$
- divShadovTd2.setAttribute(HTML.ATTR_CLASS,
"rich-inplace"+getCssStylesSuffix()+"-shadow-tr"); //$NON-NLS-1$
//$NON-NLS-2$
+ divShadovTd1.setAttribute(HTML.ATTR_CLASS, "rich-inplace" +
getCssStylesSuffix() + "-shadow-tl"); //$NON-NLS-1$ //$NON-NLS-2$
+ divShadovTd2.setAttribute(HTML.ATTR_CLASS, "rich-inplace" +
getCssStylesSuffix() + "-shadow-tr"); //$NON-NLS-1$ //$NON-NLS-2$
- divShadovTd1Tr2.setAttribute(HTML.ATTR_CLASS,
"rich-inplace"+getCssStylesSuffix()+"-shadow-bl"); //$NON-NLS-1$
//$NON-NLS-2$
- divShadovTd2Tr2.setAttribute(HTML.ATTR_CLASS,
"rich-inplace"+getCssStylesSuffix()+"-shadow-br"); //$NON-NLS-1$
//$NON-NLS-2$
+ divShadovTd1Tr2.setAttribute(HTML.ATTR_CLASS, "rich-inplace" +
getCssStylesSuffix() + "-shadow-bl"); //$NON-NLS-1$ //$NON-NLS-2$
+ divShadovTd2Tr2.setAttribute(HTML.ATTR_CLASS, "rich-inplace" +
getCssStylesSuffix() + "-shadow-br"); //$NON-NLS-1$ //$NON-NLS-2$
final nsIDOMElement divButtons = visualDocument.createElement(HTML.TAG_DIV);
divButtons.setAttribute(HTML.ATTR_STYLE, "position: relative; height:
18px;"); //$NON-NLS-1$
@@ -502,100 +437,79 @@
/*
* Encoding controls facet
*/
- Element facetElement = ComponentUtil.getFacetElement((Element) sourceNode,
"controls");
- if (null != facetElement) {
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(divButtons);
- childrenInfo.addSourceChild(facetElement);
- creationData.addChildrenInfo(childrenInfo);
- } else {
- /*
- * Create "Apply" button
- */
- final nsIDOMElement applyButtonImg = visualDocument
- .createElement(HTML.TAG_INPUT);
- applyButtonImg.setAttribute(HTML.ATTR_TYPE, "image"); //$NON-NLS-1$
+ Element facetElement = ComponentUtil.getFacetElement((Element) sourceNode,
"controls", true); //$NON-NLS-1$
+ if (facetElement != null) {
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(divButtons);
+ childrenInfo.addSourceChild(facetElement);
+ creationData.addChildrenInfo(childrenInfo);
+ } else {
+ // Create "Apply" button
+ final nsIDOMElement applyButtonImg = visualDocument.createElement(HTML.TAG_INPUT);
+ applyButtonImg.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_IMAGE);
+
+ String applyButtonClass = "rich-inplace" + getCssStylesSuffix() +
"-control"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (ComponentUtil.isNotBlank(controlClass)) {
+ applyButtonClass += Constants.EMPTY + controlClass;
+ }
+ applyButtonImg.setAttribute(HTML.ATTR_CLASS, applyButtonClass);
+
+ final String saveControlIconImg = buttonImages.get("saveControlIcon");
//$NON-NLS-1$
+ if (defaultButtonImages.containsValue(saveControlIconImg)) {
+ // Set default icon from resources
+ ComponentUtil.setImg(applyButtonImg, saveControlIconImg);
+ } else {
+ // Set custom user icon
+ String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(saveControlIconImg,
pageContext, true);
+ applyButtonImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
+ }
+ applyButtonImg.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+
+ // Create "Cancel" button
+ final nsIDOMElement cancelButtonImg =
visualDocument.createElement(HTML.TAG_INPUT);
+ cancelButtonImg.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_IMAGE);
+
+ String cancelButtonClass = "rich-inplace" + getCssStylesSuffix() +
"-control"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (ComponentUtil.isNotBlank(controlClass)) {
+ cancelButtonClass += Constants.EMPTY + controlClass;
+ }
+ cancelButtonImg.setAttribute(HTML.ATTR_CLASS, cancelButtonClass);
+
+ final String cancelControlIconImg =
buttonImages.get("cancelControlIcon"); //$NON-NLS-1$
+ if (defaultButtonImages.containsValue(cancelControlIconImg)) {
+ // Set default icon from resources
+ ComponentUtil.setImg(cancelButtonImg, cancelControlIconImg);
+ } else {
+ // Set custom user icon
+ String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(cancelControlIconImg,
pageContext, true);
+ cancelButtonImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
+ }
+ cancelButtonImg.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+
+ divButtons.appendChild(applyButtonImg);
+ divButtons.appendChild(cancelButtonImg);
+
+ /*
+ * Adding shadow to controls
+ */
+ element.appendChild(divShadov);
+ divShadov.appendChild(divShadovTable);
+ divShadovTable.appendChild(divShadovTBody);
+ divShadovTBody.appendChild(divShadovTr1);
+ divShadovTr1.appendChild(divShadovTd1);
+ divShadovTd1.appendChild(td1Img);
+ divShadovTr1.appendChild(divShadovTd2);
+ divShadovTd2.appendChild(td2Img);
+
+ divShadovTBody.appendChild(divShadovTr2);
+ divShadovTr2.appendChild(divShadovTd1Tr2);
+ divShadovTd1Tr2.appendChild(td3Img);
+ divShadovTr2.appendChild(divShadovTd2Tr2);
+ divShadovTd2Tr2.appendChild(td4Img);
+ }
- String applyButtonClass = "rich-inplace" + getCssStylesSuffix() +
"-control"; //$NON-NLS-1$ //$NON-NLS-2$
- if (ComponentUtil.isNotBlank(controlClass)) {
- applyButtonClass += " " + controlClass; //$NON-NLS-1$
- }
- applyButtonImg.setAttribute(HTML.ATTR_CLASS, applyButtonClass);
-
- final String saveControlIconImg = buttonImages
- .get("saveControlIcon"); //$NON-NLS-1$
- if (defaultButtonImages.containsValue(saveControlIconImg)) {
- /*
- * Set default icon from resources
- */
- ComponentUtil.setImg(applyButtonImg, saveControlIconImg);
- } else {
- /*
- * Set custom user icon
- */
- String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(saveControlIconImg, pageContext,
true);
- applyButtonImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
- }
- applyButtonImg.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String
- .valueOf(0));
-
- /*
- * Create "Cancel" button
- */
- final nsIDOMElement cancelButtonImg = visualDocument
- .createElement(HTML.TAG_INPUT);
- cancelButtonImg.setAttribute(HTML.ATTR_TYPE, "image"); //$NON-NLS-1$
-
- String cancelButtonClass = "rich-inplace" + getCssStylesSuffix() +
"-control"; //$NON-NLS-1$ //$NON-NLS-2$
- if (ComponentUtil.isNotBlank(controlClass)) {
- cancelButtonClass += " " + controlClass; //$NON-NLS-1$
- }
- cancelButtonImg.setAttribute(HTML.ATTR_CLASS, cancelButtonClass);
-
- final String cancelControlIconImg = buttonImages
- .get("cancelControlIcon"); //$NON-NLS-1$
- if (defaultButtonImages.containsValue(cancelControlIconImg)) {
- /*
- * Set default icon from resources
- */
- ComponentUtil.setImg(cancelButtonImg, cancelControlIconImg);
- } else {
- /*
- * Set custom user icon
- */
- String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(cancelControlIconImg,
pageContext, true);
- cancelButtonImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
- }
- cancelButtonImg.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String
- .valueOf(0));
-
- divButtons.appendChild(applyButtonImg);
- divButtons.appendChild(cancelButtonImg);
-
- /*
- * Adding shadow to controls
- */
- element.appendChild(divShadov);
- divShadov.appendChild(divShadovTable);
- divShadovTable.appendChild(divShadovTBody);
- divShadovTBody.appendChild(divShadovTr1);
- divShadovTr1.appendChild(divShadovTd1);
- divShadovTd1.appendChild(td1Img);
- divShadovTr1.appendChild(divShadovTd2);
- divShadovTd2.appendChild(td2Img);
-
- divShadovTBody.appendChild(divShadovTr2);
- divShadovTr2.appendChild(divShadovTd1Tr2);
- divShadovTd1Tr2.appendChild(td3Img);
- divShadovTr2.appendChild(divShadovTd2Tr2);
- divShadovTd2Tr2.appendChild(td4Img);
- }
-
- /*
- * Adding controls
- */
+ // Adding controls
element.appendChild(divButtons);
-
+
return element;
}
-
-}
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-12-11
16:28:37 UTC (rev 12551)
@@ -9,7 +9,6 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-
package org.jboss.tools.jsf.vpe.richfaces.template;
@@ -24,83 +23,75 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
/**
* Template for the <rich:inplaceInput> component.
- *
+ *
* @author Eugene Stherbin
*/
public class RichFacesInplaceInputTemplate extends RichFacesAbstractInplaceTemplate {
/** The input width. */
- protected String inputWidth;
+ protected String inputWidth = null;
/**
* The Constructor.
*/
public RichFacesInplaceInputTemplate() {
super();
-
}
/**
- * Create0.
- *
- * @param visualDocument the visual document
- * @param sourceNode the source node
- * @param pageContext the page context
- *
- * @return the vpe creation data
+ * Creates a node of the visual tree on the node of the source tree. This
+ * visual node should not have the parent node This visual node can have child
nodes.<br>
+ * <b>Note</b>: all in-line children will be ignored, except <f:facet>
tags with name "controls".
+ * In this case save/cancel controls will be replaced with facet content.
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceNode
+ * The current node of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @return The information on the created node of the visual tree.
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
VpeCreationData data = null;
// <span id="j_id5" class="rich-inplace rich-inplace-view"
style="">
ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
- final Element source = (Element) sourceNode;
- prepareData(pageContext,source);
- final nsIDOMElement rootSpan = createRootSpanTemplateMethod(source,
visualDocument);
+ // cast to Element
+ Element sourceElement = (Element) sourceNode;
+
+ // prepare style classes for inplace input controls
+ prepareData(pageContext, sourceElement);
+
+ final nsIDOMElement rootSpan = createRootSpanTemplateMethod(sourceElement,
visualDocument);
final nsIDOMElement innerInput1 = visualDocument.createElement(HTML.TAG_INPUT);
- data = new VpeCreationData(rootSpan);
+ data = new VpeCreationData(rootSpan, true);
- String clazz = ""; //$NON-NLS-1$
- if (this.isToggle) {
+ if (isToggle) {
rootSpan.appendChild(innerInput1);
innerInput1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
innerInput1.setAttribute(HTML.ATTR_CLASS, "rich-inplace-field");
//$NON-NLS-1$
- innerInput1.setAttribute(HTML.ATTR_STYLE, "top: 0px; width: " +
this.inputWidth + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- innerInput1.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
+ innerInput1.setAttribute(HTML.ATTR_STYLE, "top: 0px; width: " +
this.inputWidth + Constants.SEMICOLON); //$NON-NLS-1$
+ innerInput1.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_TEXT);
innerInput1.setAttribute("autocomplete", "off");
//$NON-NLS-1$ //$NON-NLS-2$
-
+
if (showControls) {
rootSpan.appendChild(createControlsDiv(pageContext, sourceNode,
visualDocument, data));
}
} else {
- innerInput1.setAttribute(HTML.ATTR_STYLE, "width: " +
this.inputWidth + "; position: absolute; left: -32767px;"); //$NON-NLS-1$
//$NON-NLS-2$
- innerInput1.setAttribute(HTML.ATTR_TYPE, "button"); //$NON-NLS-1$
-
+ innerInput1.setAttribute(HTML.ATTR_STYLE,
+ "width: " + this.inputWidth + "; position: absolute; left:
-32767px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ innerInput1.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_BUTTON);
+
/*
* Add empty children info to avoid children processing.
* Only available child is "controls" facet
*/
data.addChildrenInfo(new VpeChildrenInfo(rootSpan));
}
-
-
if (!isToggle) {
- final String value = getValue();
-//
-// if (value.equals(DEFAULT_NULL_VALUE)) {
-// final nsIDOMElement innerSpan =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
-// rootSpan.appendChild(innerSpan);
-// innerSpan.appendChild(visualDocument.createTextNode(value));
-// innerSpan.setAttribute(HTML.ATTR_STYLE, "display: none");
-// inner
-// innerSpan.setAttribute(VPE_USER_TOGGLE_ID_ATTR,
String.valueOf(this.isToggle));
-//// rootSpan.appendChild(visualDocument.createTextNode(value));
-//// rootSpan.setAttribute(HTML.ATTR_STYLE,
rootSpan.getAttribute(HTML.ATTR_STYLE) +" ; display:none");
-// } else {
- rootSpan.appendChild(visualDocument.createTextNode(value));
- // }
+ rootSpan.appendChild(visualDocument.createTextNode(getValue()));
} else {
innerInput1.setAttribute(HTML.ATTR_VALUE, this.sourceValue);
}
@@ -110,10 +101,9 @@
return data;
}
-
/**
* Gets the css extension.
- *
+ *
* @return the css extension
*/
protected String getCssExtension() {
@@ -122,7 +112,7 @@
/**
* Gets the css style.
- *
+ *
* @return the css style
*/
protected String getCssStyle() {
@@ -131,27 +121,25 @@
/**
* Gets the css styles suffix.
- *
+ *
* @return the css styles suffix
- *
- * @see org.jboss.tools.jsf.vpe.richfaces.template.
- * RichFacesAbstractInplaceTemplate#getCssStylesSuffix()
+ * @see
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStylesSuffix()
*/
@Override
protected String getCssStylesSuffix() {
- return ""; //$NON-NLS-1$
+ return Constants.EMPTY;
}
/**
* Gets the root span classes.
- *
+ *
* @return the root span classes
*/
protected String[] getRootSpanClasses() {
String[] rst = new String[3];
- String clazz = ""; //$NON-NLS-1$
+ String clazz = Constants.EMPTY;
- if (this.isToggle) {
+ if (isToggle) {
rst[0] = "rich-inplace-edit"; //$NON-NLS-1$
if (ComponentUtil.isNotBlank(this.editClass)) {
clazz = this.editClass;
@@ -160,8 +148,8 @@
} else {
rst[0] = "rich-inplace-view"; //$NON-NLS-1$
if (ComponentUtil.isNotBlank(this.viewClass)) {
- clazz = this.viewClass;
- rst[1] = clazz;
+ clazz = this.viewClass;
+ rst[1] = clazz;
}
}
if (ComponentUtil.isNotBlank(this.styleClass)) {
@@ -172,20 +160,19 @@
/**
* Prepare data.
- *
+ *
* @param source the source
*/
- protected void prepareData(VpePageContext pageContext,Element source) {
+ protected void prepareData(VpePageContext pageContext, Element source) {
try {
- this.inputWidth = String.valueOf(ComponentUtil
- .parseWidthHeightValue(source.getAttribute("inputWidth"))) +
Constants.PIXEL; //$NON-NLS-1$
+ this.inputWidth =
String.valueOf(ComponentUtil.parseWidthHeightValue(source.getAttribute("inputWidth")))
+ //$NON-NLS-1$
+ Constants.PIXEL;
} catch (NumberFormatException e) {
this.inputWidth = DEFAULT_INPUT_WIDTH_VALUE;
}
this.controlsHorizontalPositions.put("right", this.inputWidth);
//$NON-NLS-1$
- this.controlsHorizontalPositions.put(CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE,
"18px"); //$NON-NLS-1$
- super.prepareData(pageContext,source);
-
+ this.controlsHorizontalPositions.put(HTML.VALUE_ALIGN_CENTER, "18px");
//$NON-NLS-1$
+ super.prepareData(pageContext, source);
}
/**
@@ -199,12 +186,11 @@
@Override
protected String getControlPositionsSubStyles() {
return "top: " +
controlsVerticalPositions.get(this.controlsVerticalPosition) //$NON-NLS-1$
- + ";left:" + " " +
controlsHorizontalPositions.get(this.controlsHorizontalPosition) + ";";
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + ";left:" + " " +
controlsHorizontalPositions.get(this.controlsHorizontalPosition) + Constants.SEMICOLON;
//$NON-NLS-1$//$NON-NLS-2$
}
@Override
protected String getMainControlsDivCssClass() {
return
"rich-inplace"+getCssStylesControlSuffix()+"-controls-set";
//$NON-NLS-1$ //$NON-NLS-2$
}
-
-}
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-12-11
16:28:37 UTC (rev 12551)
@@ -9,94 +9,91 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-
package org.jboss.tools.jsf.vpe.richfaces.template;
-
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
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.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
/**
* Template for <rich:inplaceSelect/> tag.
- *
+ *
* @author Eugene Stherbin
*/
public class RichFacesInplaceSelectTemplate extends RichFacesAbstractInplaceTemplate {
- private static final String _24PX = "24px";
+ private static final String SOURCE_LIST_HEIGHT = "24px"; //$NON-NLS-1$
/** The Constant INPLACE_SELECT_CSS. */
- private static final String INPLACE_SELECT_CSS =
"inplaceSelect/inplaceSelect.css";
+ private static final String INPLACE_SELECT_CSS =
"inplaceSelect/inplaceSelect.css"; //$NON-NLS-1$
/** The Constant INPLACE_SELECT_EXT. */
- private static final String INPLACE_SELECT_EXT = "inplaceSelect";
+ private static final String INPLACE_SELECT_EXT = "inplaceSelect";
//$NON-NLS-1$
- /** The select width. */
- private String selectWidth;
-
protected String sourceListHeight;
-
+
protected String sourceListWidth;
/**
- * Create.
- *
- * @param visualDocument
- * the visual document
- * @param sourceNode
- * the source node
- * @param pageContext
- * the page context
- *
- * @return the vpe creation data
+ * Creates a node of the visual tree on the node of the source tree. This
+ * visual node should not have the parent node This visual node can have child nodes.
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceNode
+ * The current node of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @return The information on the created node of the visual tree.
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
VpeCreationData data = null;
// <span id="j_id5" class="rich-inplace rich-inplace-view"
style="">
ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
- final Element source = (Element) sourceNode;
- prepareData(pageContext,source);
- final nsIDOMElement rootSpan = createRootSpanTemplateMethod(source,
visualDocument);
- data = new VpeCreationData(rootSpan);
+ // cast to Element
+ final Element sourceElement = (Element) sourceNode;
+ // prepare style classes for inplace input controls
+ prepareData(pageContext, sourceElement);
+
+ final nsIDOMElement rootSpan = createRootSpanTemplateMethod(sourceElement,
visualDocument);
+ data = new VpeCreationData(rootSpan, true);
+
if (isToggle) {
- final nsIDOMElement innerInput1 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- final nsIDOMElement innerInput2 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
+ final nsIDOMElement innerInput1 =
visualDocument.createElement(HTML.TAG_INPUT);
+ final nsIDOMElement innerInput2 =
visualDocument.createElement(HTML.TAG_INPUT);
preapareInputBase(innerInput1);
preapareInputBase(innerInput2);
innerInput1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
- innerInput1.setAttribute("autocomplete", "off");
- innerInput1.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-field");
- innerInput1.setAttribute(HTML.ATTR_VALUE, ((this.defaultLabel == null) ?
"" : this.defaultLabel));
+ innerInput1.setAttribute("autocomplete", "off");
//$NON-NLS-1$ //$NON-NLS-2$
+ innerInput1.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-field"); //$NON-NLS-1$
+ innerInput1.setAttribute(HTML.ATTR_VALUE,
+ ((this.defaultLabel == null) ? Constants.EMPTY : this.defaultLabel));
// TODO
- innerInput1.setAttribute(HTML.ATTR_STYLE, "top: 1px ;
width:100px");
+ innerInput1.setAttribute(HTML.ATTR_STYLE, "top: 1px ;
width:100px"); //$NON-NLS-1$
innerInput1.setAttribute(HTML.ATTR_VALUE, getValue());
- innerInput2.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-arrow");
+ innerInput2.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-arrow"); //$NON-NLS-1$
// TODO
- innerInput2.setAttribute(HTML.ATTR_STYLE, "top: 2px; left:
89px;");
+ innerInput2.setAttribute(HTML.ATTR_STYLE, "top: 2px; left: 89px;");
//$NON-NLS-1$
rootSpan.appendChild(innerInput1);
rootSpan.appendChild(innerInput2);
- if (ComponentUtil.getSelectItems(source.getChildNodes()).size() > 0) {
- final nsIDOMElement selectList = createSelectedList(source,
visualDocument);
+ if (ComponentUtil.getSelectItems(sourceElement.getChildNodes()).size() >
0) {
+ final nsIDOMElement selectList = createSelectedList(sourceElement,
visualDocument);
rootSpan.appendChild(selectList);
}
- if (this.showControls) {
+ if (showControls) {
rootSpan.appendChild(createControlsDiv(pageContext, sourceNode,
visualDocument, data));
}
-
} else {
rootSpan.appendChild(visualDocument.createTextNode(getValue()));
}
@@ -107,86 +104,80 @@
/**
* Creates the selected list.
- *
- * @param visualDocument
- * the visual document
- * @param source
- * the source
- *
+ *
+ * @param visualDocument the visual document
+ * @param source the source
* @return the ns IDOM element
*/
private nsIDOMElement createSelectedList(Element source, nsIDOMDocument
visualDocument) {
// rich-inplace-select-width-list
- final nsIDOMElement div =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- div.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-width-list");
+ div.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-width-list");
//$NON-NLS-1$
div.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
- div.setAttribute(HTML.ATTR_STYLE, "position: absolute; height: 100px; left:
0px; top: 22px; visibility: visible;");
+ div.setAttribute(HTML.ATTR_STYLE, "position: absolute; height: 100px; left:
0px; top: 22px; visibility: visible;"); //$NON-NLS-1$
- final nsIDOMElement shadowDiv =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement shadowDiv = visualDocument.createElement(HTML.TAG_DIV);
- shadowDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-shadow");
- shadowDiv.setAttribute(HTML.ATTR_STYLE, "");
+ shadowDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-shadow"); //$NON-NLS-1$
+ shadowDiv.setAttribute(HTML.ATTR_STYLE, Constants.EMPTY);
- final nsIDOMElement table =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- final nsIDOMElement tr1 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
- final nsIDOMElement tr2 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ final nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
+ final nsIDOMElement tr1 = visualDocument.createElement(HTML.TAG_TR);
+ final nsIDOMElement tr2 = visualDocument.createElement(HTML.TAG_TR);
- final nsIDOMElement td1 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- final nsIDOMElement td2 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- final nsIDOMElement td3 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- final nsIDOMElement td4 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ final nsIDOMElement td1 = visualDocument.createElement(HTML.TAG_TD);
+ final nsIDOMElement td2 = visualDocument.createElement(HTML.TAG_TD);
+ final nsIDOMElement td3 = visualDocument.createElement(HTML.TAG_TD);
+ final nsIDOMElement td4 = visualDocument.createElement(HTML.TAG_TD);
- td1.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-tl");
- td2.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-tr");
- td3.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-bl");
- td4.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-br");
+ td1.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-tl");
//$NON-NLS-1$
+ td2.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-tr");
//$NON-NLS-1$
+ td3.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-bl");
//$NON-NLS-1$
+ td4.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-shadow-br");
//$NON-NLS-1$
- final nsIDOMElement img1 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- final nsIDOMElement img2 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- final nsIDOMElement img3 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- final nsIDOMElement img4 =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ final nsIDOMElement img1 = visualDocument.createElement(HTML.TAG_IMG);
+ final nsIDOMElement img2 = visualDocument.createElement(HTML.TAG_IMG);
+ final nsIDOMElement img3 = visualDocument.createElement(HTML.TAG_IMG);
+ final nsIDOMElement img4 = visualDocument.createElement(HTML.TAG_IMG);
setUpImg(img1, 10, 1, 0, SPACER_GIF);
setUpImg(img2, 1, 10, 0, SPACER_GIF);
setUpImg(img3, 1, 10, 0, SPACER_GIF);
setUpImg(img4, 10, 10, 0, SPACER_GIF);
- final nsIDOMElement listPositionDiv =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- listPositionDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-position");
+ final nsIDOMElement listPositionDiv =
visualDocument.createElement(HTML.TAG_DIV);
+ listPositionDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-position"); //$NON-NLS-1$
listPositionDiv.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
- final nsIDOMElement listDecarationDiv =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- listDecarationDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-decoration");
+ final nsIDOMElement listDecarationDiv =
visualDocument.createElement(HTML.TAG_DIV);
+ listDecarationDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-decoration"); //$NON-NLS-1$
- final nsIDOMElement listScrollDiv =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement listScrollDiv = visualDocument.createElement(HTML.TAG_DIV);
final List<Element> elements =
ComponentUtil.getSelectItems(source.getChildNodes());
// added by estherbin
// fix
http://jira.jboss.com/jira/browse/JBIDE-2196
// tramanovich comment.
-
- if (this.sourceListHeight == _24PX) {
+ if (this.sourceListHeight == SOURCE_LIST_HEIGHT) {
int height = 24;
-
if ((elements != null) && (elements.size() > 1)) {
height += ((elements.size() - 2) * 24)+1;
}
- this.sourceListHeight = String.valueOf(height) +
String.valueOf("px");
+ this.sourceListHeight = String.valueOf(height) +
String.valueOf(Constants.PIXEL);
}
- listScrollDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-scroll");
- listScrollDiv.setAttribute(HTML.ATTR_STYLE, "height:" +
this.sourceListHeight + "; width: " + this.sourceListWidth);
+ listScrollDiv.setAttribute(HTML.ATTR_CLASS,
"rich-inplace-select-list-scroll"); //$NON-NLS-1$
+ listScrollDiv.setAttribute(HTML.ATTR_STYLE, "height:" +
this.sourceListHeight + "; width: " + this.sourceListWidth); //$NON-NLS-1$
//$NON-NLS-2$
if (elements.size() > 0) {
for (Element e : elements) {
- final nsIDOMElement span =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ final nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
- span.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-item
rich-inplace-select-font");
+ span.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-item
rich-inplace-select-font"); //$NON-NLS-1$
span.appendChild(visualDocument.createTextNode(ComponentUtil.getSelectItemValue(e)));
- span.setAttribute(HTML.ATTR_STYLE, "text-align: left;");
+ span.setAttribute(HTML.ATTR_STYLE, "text-align: left;");
//$NON-NLS-1$
listScrollDiv.appendChild(span);
}
-
}
div.appendChild(shadowDiv);
@@ -201,28 +192,26 @@
tr1.appendChild(td2);
td1.appendChild(img1);
- td1.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ td1.appendChild(visualDocument.createElement(HTML.TAG_BR));
td2.appendChild(img2);
- td2.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ td2.appendChild(visualDocument.createElement(HTML.TAG_BR));
table.appendChild(tr2);
tr2.appendChild(td3);
tr2.appendChild(td4);
td3.appendChild(img3);
- td3.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ td3.appendChild(visualDocument.createElement(HTML.TAG_BR));
td4.appendChild(img4);
- td4.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ td4.appendChild(visualDocument.createElement(HTML.TAG_BR));
return div;
}
/**
* Gets the css extension.
- *
+ *
* @return the css extension
- *
- * @see org.jboss.tools.jsf.vpe.richfaces.template.
- * RichFacesAbstractInplaceTemplate#getCssExtension()
+ * @see
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssExtension()
*/
@Override
protected String getCssExtension() {
@@ -231,11 +220,9 @@
/**
* Gets the css style.
- *
+ *
* @return the css style
- *
- * @see org.jboss.tools.jsf.vpe.richfaces.template.
- * RichFacesAbstractInplaceTemplate#getCssStyle()
+ * @see
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStyle()
*/
@Override
protected String getCssStyle() {
@@ -244,34 +231,31 @@
/**
* Gets the css styles suffix.
- *
+ *
* @return the css styles suffix
*/
@Override
protected String getCssStylesSuffix() {
- return "-select";
+ return "-select"; //$NON-NLS-1$
}
/**
* Gets the root span classes.
- *
+ *
* @return the root span classes
- *
- * @see org.jboss.tools.jsf.vpe.richfaces.template.
- * RichFacesAbstractInplaceTemplate#getRootSpanClasses()
+ * @see
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getRootSpanClasses()
*/
@Override
protected String[] getRootSpanClasses() {
String[] result = new String[2];
- String clazz = "";
-
+ String clazz = Constants.EMPTY;
if (this.isToggle) {
- result[0] = "rich-inplace-select-edit";
+ result[0] = "rich-inplace-select-edit"; //$NON-NLS-1$
if (ComponentUtil.isNotBlank(this.editClass)) {
clazz = this.editClass;
}
} else {
- result[0] = "rich-inplace-select-view";
+ result[0] = "rich-inplace-select-view"; //$NON-NLS-1$
if (ComponentUtil.isNotBlank(this.viewClass)) {
clazz = this.viewClass;
}
@@ -281,45 +265,39 @@
}
/**
- * Preapare input base.
- *
- * @param innerInput
- * the inner input
- * @param innerInput1
+ * Prepare input base.
+ *
+ * @param innerInput the inner input
*/
private void preapareInputBase(nsIDOMElement innerInput) {
- innerInput.setAttribute(HTML.ATTR_TYPE, "text");
- innerInput.setAttribute(HtmlComponentUtil.HTML_READONLY_ATTR, "text");
-
+ innerInput.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_TEXT);
+ innerInput.setAttribute(HTML.ATTR_READONLY, HTML.VALUE_TYPE_TEXT);
}
/**
* Prepare data.
- *
- * @param source
- * the source
+ *
+ * @param pageContext VpePageContext object
+ * @param source the source
*/
@Override
- protected void prepareData(VpePageContext pageContext,Element source) {
-
- this.sourceListHeight =
ComponentUtil.getAttribute(source,"listHeight");
- this.sourceListWidth = ComponentUtil.getAttribute(source,
"listWidth");
-
+ protected void prepareData(VpePageContext pageContext, Element source) {
+ this.sourceListHeight = ComponentUtil.getAttribute(source,
"listHeight"); //$NON-NLS-1$
+ this.sourceListWidth = ComponentUtil.getAttribute(source, "listWidth");
//$NON-NLS-1$
if (ComponentUtil.isBlank(this.sourceListHeight)) {
- this.sourceListHeight = _24PX;
+ this.sourceListHeight = SOURCE_LIST_HEIGHT;
}
if (ComponentUtil.isBlank(this.sourceListWidth)) {
- this.sourceListWidth = String.valueOf("198px");
+ this.sourceListWidth = String.valueOf("198px"); //$NON-NLS-1$
}
-
- super.prepareData(pageContext,source);
+ super.prepareData(pageContext, source);
}
@Override
protected void initPositions() {
- this.controlsVerticalPositions.put("center", "100px");
+ this.controlsVerticalPositions.put(HTML.VALUE_ALIGN_CENTER, "100px");
//$NON-NLS-1$
}
/**
@@ -330,17 +308,20 @@
return this.getCssStylesSuffix();
}
+ /**
+ * @see
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getControlPositionsSubStyles()
+ */
@Override
protected String getControlPositionsSubStyles() {
-
- return "top:0px ; left: " +
controlsVerticalPositions.get(this.controlsVerticalPosition)
- + ";left:" + " " +
controlsHorizontalPositions.get(this.controlsHorizontalPosition) + ";";
+ return "top:0px ; left: " +
controlsVerticalPositions.get(this.controlsVerticalPosition) //$NON-NLS-1$
+ + ";left: " +
controlsHorizontalPositions.get(this.controlsHorizontalPosition) + Constants.SEMICOLON;
//$NON-NLS-1$
}
+ /**
+ * @see
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getMainControlsDivCssClass()
+ */
@Override
protected String getMainControlsDivCssClass() {
- // TODO Auto-generated method stub
- return
"rich-inplace"+getCssStylesControlSuffix()+"-control-set";
+ return "rich-inplace" + getCssStylesControlSuffix() +
"-control-set"; //$NON-NLS-1$ //$NON-NLS-2$
}
-
-}
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2008-12-11
16:28:37 UTC (rev 12551)
@@ -11,69 +11,33 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
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.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
* Class for creating Paint2D content
- *
+ *
* @author Max Areshkau
- *
*/
public class RichFacesPaint2DTemplate extends VpeAbstractTemplate {
- private String IMAGE_NAME = "/paint2D/paint2D.gif";
+ /** IMAGE_NAME */
+ private static final String IMAGE_NAME = "/paint2D/paint2D.gif";
//$NON-NLS-1$
- private String PAINT2D_CSS_FILE = "/paint2D/paint2D.css";
+ /** PAINT2D_CSS_FILE */
+ private static final String PAINT2D_CSS_FILE = "/paint2D/paint2D.css";
//$NON-NLS-1$
- /*
- * (non-Javadoc)
- *
- * @see
com.exadel.vpe.editor.template.VpeAbstractTemplate#removeAttribute(com.exadel.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.w3c.dom.Document, org.w3c.dom.Node,
- * java.lang.Object, java.lang.String)
- */
- @Override
- public void removeAttribute(VpePageContext pageContext, Element sourceElement,
nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data, String name) {
- super.removeAttribute(pageContext, sourceElement, visualDocument, visualNode, data,
name);
- nsIDOMElement img =
(nsIDOMElement)visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if (name.equals("styleClass")
- && sourceElement.getAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR) == null
- && sourceElement.getAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR) == null) {
- img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,"imgStyleClass");
- } else
- img.removeAttribute(name);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
com.exadel.vpe.editor.template.VpeAbstractTemplate#setAttribute(com.exadel.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.w3c.dom.Document, org.w3c.dom.Node,
- * java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public void setAttribute(VpePageContext pageContext, Element sourceElement,
nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data, String name, String
value) {
- super.setAttribute(pageContext, sourceElement, visualDocument, visualNode, data, name,
value);
- nsIDOMElement img = (nsIDOMElement)
visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if (name.equals("styleClass")) {
- img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, value);
- } else
- img.setAttribute(name, value);
- }
-
/**
* Create html instead rich:faces component.
- *
+ *
* @param pageContext
* Contains the information on edited page.
* @param sourceNode
@@ -83,22 +47,20 @@
* @return The information on the created node of the visual tree.
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- nsIDOMElement img = visualDocument.createElement("img");
+ ComponentUtil.setCSSLink(pageContext, PAINT2D_CSS_FILE, "paint2d");
//$NON-NLS-1$
+
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
ComponentUtil.setImg(img, IMAGE_NAME);
- ComponentUtil.setCSSLink(pageContext, PAINT2D_CSS_FILE, "paint2d");
- String attrValue = ((Element) sourceNode).getAttribute("styleClass");
+ String attrValue = ((Element) sourceNode).getAttribute(RichFaces.ATTR_STYLE_CLASS);
if (attrValue != null && attrValue.length() != 0) {
- img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, attrValue);
- } else if (((Element) sourceNode)
- .getAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR) == null
- && ((Element) sourceNode)
- .getAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR) == null) {
- img
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "imgStyleClass");
+ img.setAttribute(HTML.ATTR_CLASS, attrValue);
+ } else if (((Element) sourceNode).getAttribute(HTML.ATTR_WIDTH) == null
+ && ((Element) sourceNode).getAttribute(HTML.ATTR_HEIGHT) == null) {
+ img.setAttribute(HTML.ATTR_CLASS, "imgStyleClass"); //$NON-NLS-1$
}
VisualDomUtil.copyAttributes(sourceNode, img);
VpeCreationData creationData = new VpeCreationData(img);
+
return creationData;
}
}
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 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-12-11
16:28:37 UTC (rev 12551)
@@ -97,7 +97,7 @@
</vpe:template>
</vpe:tag>
<vpe:tag name="rich:inplaceSelect" case-sensitive="yes">
- <vpe:template children="no" modify="no"
+ <vpe:template children="yes" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesInplaceSelectTemplate">
<!--vpe:resize>
<vpe:width width-attr="style.width" />
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml 2008-12-11
16:28:37 UTC (rev 12551)
@@ -3,4 +3,58 @@
<SPAN VPE-USER-TOGGLE-ID="false" CLASS="rich-inplace
rich-inplace-view"
STYLE="display: inline;"> click to enter your name</SPAN>
</test>
+ <!-- test id="inplaceInputWithoutFacet">
+ <SPAN VPE-USER-TOGGLE-ID="true" CLASS="rich-inplace
rich-inplace-edit"
+ STYLE="position: relative; display: inline;">
+ <INPUT TYPE="text" VPE-USER-TOGGLE-ID="0"
CLASS="rich-inplace-field" STYLE="top: 0px; width: 66px;"
+ AUTOCOMPLETE="off" VALUE="Mama mila ram"/>
+ <DIV CLASS="rich-inplace-input-controls-set" STYLE="position:
absolute; top: 0px; left: 66px;">
+ <DIV CLASS="rich-inplace-shadow">
+ <TABLE CELLSPACING="0" CELLPADDING="0"
BORDER="0">
+ <TBODY>
+ <TR>
+ <TD CLASS="rich-inplace-shadow-tl">
+ <IMG WIDTH="10" HEIGHT="1"
BORDER="0" SRC="/.*resources/inplaceInput/spacer.gif/"/>
+ </TD>
+ <TD CLASS="rich-inplace-shadow-tr">
+ <IMG WIDTH="1" HEIGHT="10"
BORDER="0" SRC="/.*resources/resources/inplaceInput/spacer.gif/"/>
+ </TD>
+ </TR>
+ <TR>
+ <TD CLASS="rich-inplace-shadow-bl">
+ <IMG WIDTH="1" HEIGHT="10"
BORDER="0" SRC="/.*resources/inplaceInput/spacer.gif/"/>
+ </TD>
+ <TD CLASS="rich-inplace-shadow-br">
+ <IMG WIDTH="10" HEIGHT="1"
BORDER="0" SRC="/.*resources/inplaceInput/spacer.gif/"/>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ <DIV STYLE="position: relative; height: 18px;">
+ <INPUT TYPE="image" CLASS="rich-inplace-control"
+ SRC="/.*resources/inplaceInput/applyButton.gif/"
VPE-USER-TOGGLE-ID="0"/>
+ <INPUT TYPE="image" CLASS="rich-inplace-control"
+ SRC="/.*resources/inplaceInput/cancelButton.gif/"
VPE-USER-TOGGLE-ID="0"/>
+ </DIV>
+ </DIV>
+ </SPAN>
+ </test>
+ <test id="inplaceInputWithFacet">
+ <SPAN VPE-USER-TOGGLE-ID="true" CLASS="rich-inplace
rich-inplace-edit"
+ STYLE="position: relative; display: inline;">
+ <INPUT TYPE="text" VPE-USER-TOGGLE-ID="0"
CLASS="rich-inplace-field" STYLE="top: 0px; width: 66px;"
+ AUTOCOMPLETE="off" VALUE="Mama mila ramu"/>
+ <DIV CLASS="rich-inplace-input-controls-set" STYLE="position:
absolute; top: 18px; left: 0px;">
+ <DIV STYLE="position: relative; height: 18px;">
+ <DIV>
+ <SPAN TITLE="h:panelGroup"
STYLE="-moz-user-modify: read-write;" CLASS="">
+ <INPUT TYPE="button" VALUE="Save"
STYLE="-moz-user-modify: read-only;"/>
+ <INPUT TYPE="button" VALUE="Cancel"
STYLE="-moz-user-modify: read-only;"/>
+ </SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </SPAN>
+ </test-->
</tests>
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-12-11
15:08:09 UTC (rev 12550)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-12-11
16:28:37 UTC (rev 12551)
@@ -101,11 +101,13 @@
* it will not work with documents without DOCTYPE. It is the reason
* why the value '100' is used.*/
public static final String VALUE_COLSPAN_ALL = "100"; //$NON-NLS-1$
-
+
public static final String VALUE_ALIGN_TOP = "top"; //$NON-NLS-1$
public static final String VALUE_ALIGN_RIGHT = "right"; //$NON-NLS-1$
public static final String VALUE_ALIGN_LEFT = "left"; //$NON-NLS-1$
+ public static final String VALUE_ALIGN_BOTTOM = "bottom"; //$NON-NLS-1$
public static final String VALUE_ALIGN_MIDDLE = "middle"; //$NON-NLS-1$
+ public static final String VALUE_ALIGN_CENTER = "center"; //$NON-NLS-1$
public static final String VALUE_CLASS_DELIMITER = " "; //$NON-NLS-1$
public static final String VALUE_STYLE_DELIMITER = ";"; //$NON-NLS-1$
public static final String VALUE_TYPE_TEXT = "text"; //$NON-NLS-1$
@@ -115,7 +117,6 @@
public static final String VALUE_TYPE_CHECKBOX = "checkbox"; //$NON-NLS-1$
public static final String VALUE_TYPE_HIDDEN = "hidden"; //$NON-NLS-1$
public static final String VALUE_TYPE_BUTTON= "button"; //$NON-NLS-1$
- public static final String VALUE_ALIGN_CENTER = "center"; //$NON-NLS-1$
public static final String VALUE_CLEAR_BOTH = "both"; //$NON-NLS-1$
public static final String STYLE_PARAMETER_DISPLAY = "display"; //$NON-NLS-1$