Author: dmaliarevich
Date: 2008-01-11 11:47:52 -0500 (Fri, 11 Jan 2008)
New Revision: 5633
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/table_header_cell_bg.gif
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/bottom.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/down.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/top.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/up.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
Log:
rich faces orderingList template updated
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/bottom.gif
===================================================================
(Binary files differ)
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif
===================================================================
(Binary files differ)
Property changes on:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/down.gif
===================================================================
(Binary files differ)
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css
===================================================================
---
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css 2008-01-11
16:19:36 UTC (rev 5632)
+++
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css 2008-01-11
16:47:52 UTC (rev 5633)
@@ -116,8 +116,83 @@
border: solid 1px #C4C0C9;
}
-.dr-control-buttons {
- font-size: 11px;
- color: #000000;
- font-family: Arial, Verdana, sans-serif;
+.rich-ordering-list-button-layout {
+ padding:15px 8px 15px 0pt;
}
+
+.rich-ordering-control-disabled {
+ border:1px solid;
+ margin-bottom:3px;
+}
+
+.rich-ordering-control {
+ border:1px solid;
+ margin-bottom:3px;
+}
+
+.rich-ordering-list-button {
+ background-color:#E3DED5;
+ background-repeat: repeat-x;
+ background-attachment: scroll;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ cursor: pointer;
+}
+
+.rich-ordering-list-button-disabled {
+background-color:#E3DED5;
+background-image:url(/richfaces-demo/a4j_3_1_3.GAorg.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient/DATB/eAH7....1XuPARQVBZQ_.jsf);
+color:#B1ADA7;
+font-family:Arial,Verdana,sans-serif;
+font-size:11px;
+}
+.rich-ordering-list-button-light {
+background-color:#E3DED5;
+background-image:url(/richfaces-demo/a4j_3_1_3.GAorg.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient/DATB/eAH7....1XuPARQVBZQ_.jsf);
+border-color:#E79A00;
+border-width:1px;
+color:#000000;
+font-family:Arial,Verdana,sans-serif;
+font-size:11px;
+}
+.rich-ordering-list-button-press {
+background-color:#E3DED5;
+background-image:url(/richfaces-demo/a4j_3_1_3.GAorg.richfaces.renderkit.html.gradientimages.OrderingListClickedGradient/DATB/eAG7eu.x....ARLgBZQ_.jsf);
+border-color:#C4C0C9;
+border-width:1px;
+color:#000000;
+font-family:Arial,Verdana,sans-serif;
+font-size:11px;
+}
+
+a.rich-ordering-list-button-selection:visited,
a.rich-ordering-list-button-selection:link,
a.rich-ordering-list-button-a-disabled:visited,
a.rich-ordering-list-button-a-disabled:link {
+ text-decoration:none;
+}
+
+.rich-ordering-list-button-content {
+ padding:0pt 4px 0pt 1px;
+ text-align:left;
+ white-space:nowrap;
+}
+
+.rich-ordering-list-button-content img {
+ margin-right:2px;
+ vertical-align:middle;
+}
+
+.rich-ordering-list-table-header-cell, .rich-ordering-list-table-header-cell-last {
+background-color:#E3DED5;
+
+border-bottom-color:#C4C0C9;
+border-bottom-width:1px;
+border-right-color:#C4C0C9;
+border-right-width:1px;
+color:#000000;
+font-family:Arial,Verdana,sans-serif;
+font-size:11px;
+}
+.rich-ordering-list-table-header-cell-last {
+border-right-width:0pt;
+}
+
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/table_header_cell_bg.gif
===================================================================
(Binary files differ)
Property changes on:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/table_header_cell_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/top.gif
===================================================================
(Binary files differ)
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/up.gif
===================================================================
(Binary files differ)
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
===================================================================
---
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2008-01-11
16:19:36 UTC (rev 5632)
+++
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2008-01-11
16:47:52 UTC (rev 5633)
@@ -68,6 +68,9 @@
/** HTML_TAG_SPAN */
public static final String HTML_TAG_SPAN = "SPAN";
+
+ /** HTML_TAG_A */
+ public static final String HTML_TAG_A = "A";
/** HTML_TAG_B */
public static final String HTML_TAG_B = "B";
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
---
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-11
16:19:36 UTC (rev 5632)
+++
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-11
16:47:52 UTC (rev 5633)
@@ -46,6 +46,9 @@
private static final String DOWN_CONTROL_IMG = "orderingList/down.gif";
private static final String BOTTOM_CONTROL_IMG = "orderingList/bottom.gif";
+ private static final String BUTTON_BG = "orderingList/button_bg.gif";
+ private static final String HEADER_CELL_BG =
"orderingList/header_cell_bg.gif";
+
private static final String LIST_WIDTH = "listWidth";
private static final String LIST_HEIGHT = "listHeight";
@@ -120,10 +123,10 @@
nsIDOMElement row1_TD1_DIV = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
row1_TD1_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- STYLE_FOR_CAPTOION_LABEL
- + "width: " + (listWidth == null ? DEFAULT_WIDTH : listWidth) +
"px");
- row1_TD1_DIV.appendChild(visualDocument
- .createTextNode(captionLabel));
+ STYLE_FOR_CAPTOION_LABEL + "width: "
+ + (listWidth == null ? DEFAULT_WIDTH : listWidth)
+ + "px");
+ row1_TD1_DIV.appendChild(visualDocument.createTextNode(captionLabel));
row1_TD1.appendChild(row1_TD1_DIV);
// ---------------------row2------------------------
@@ -136,65 +139,37 @@
row2.appendChild(row2_TD2);
// ---------------------buttonsTable------------------------
- nsIDOMElement buttonsTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
-
- nsIDOMElement btnRow1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement btnRow1_TD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- btnRow1.appendChild(btnRow1_TD);
-
- nsIDOMElement btnRow2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement btnRow2_TD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- btnRow2.appendChild(btnRow2_TD);
-
- nsIDOMElement btnRow3 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement btnRow3_TD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- btnRow3.appendChild(btnRow3_TD);
-
- nsIDOMElement btnRow4 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement btnRow4_TD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- btnRow4.appendChild(btnRow4_TD);
-
- nsIDOMElement btnUp = createButton(visualDocument,
+ nsIDOMElement buttonsDiv = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ buttonsDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"rich-ordering-list-button-layout");
+
+ nsIDOMElement btnTopDiv = createButtonDiv(visualDocument,
+ (null == upControlLabel ? TOP_CONTROL_LABEL_DEFAULT
+ : upControlLabel), TOP_CONTROL_IMG, new Boolean(
+ showButtonLabels).booleanValue());
+ nsIDOMElement btnUpDiv = createButtonDiv(visualDocument,
(null == upControlLabel ? UP_CONTROL_LABEL_DEFAULT
: upControlLabel), UP_CONTROL_IMG, new Boolean(
showButtonLabels).booleanValue());
- nsIDOMElement btnDown = createButton(visualDocument,
- (null == downControlLabel ? DOWN_CONTROL_LABEL_DEFAULT
- : downControlLabel), DOWN_CONTROL_IMG, new Boolean(
+ nsIDOMElement btnDownDiv = createButtonDiv(visualDocument,
+ (null == upControlLabel ? DOWN_CONTROL_LABEL_DEFAULT
+ : upControlLabel), DOWN_CONTROL_IMG, new Boolean(
showButtonLabels).booleanValue());
- btnRow2_TD.appendChild(btnUp);
- btnRow3_TD.appendChild(btnDown);
+ nsIDOMElement btnBottomDiv = createButtonDiv(visualDocument,
+ (null == upControlLabel ? BOTTOM_CONTROL_LABEL_DEFAULT
+ : upControlLabel), BOTTOM_CONTROL_IMG, new Boolean(
+ showButtonLabels).booleanValue());
- if (fastOrderControlsVisible) {
- nsIDOMElement btnTop = createButton(visualDocument,
- (null == topControlLabel ? TOP_CONTROL_LABEL_DEFAULT
- : topControlLabel), TOP_CONTROL_IMG, new Boolean(
- showButtonLabels).booleanValue());
- nsIDOMElement btnBottom = createButton(visualDocument,
- (null == bottomControlLabel ? BOTTOM_CONTROL_LABEL_DEFAULT
- : bottomControlLabel), BOTTOM_CONTROL_IMG,
- new Boolean(showButtonLabels).booleanValue());
- btnRow1_TD.appendChild(btnTop);
- btnRow4_TD.appendChild(btnBottom);
- }
-
- buttonsTable.appendChild(btnRow1);
- buttonsTable.appendChild(btnRow2);
- buttonsTable.appendChild(btnRow3);
- buttonsTable.appendChild(btnRow4);
-
+ buttonsDiv.appendChild(btnTopDiv);
+ buttonsDiv.appendChild(btnUpDiv);
+ buttonsDiv.appendChild(btnDownDiv);
+ buttonsDiv.appendChild(btnBottomDiv);
+
row2_TD2.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "center");
- row2_TD2.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN,
("center".equalsIgnoreCase(controlsVerticalAlign) ? "middle" :
controlsVerticalAlign));
- row2_TD2.appendChild(buttonsTable);
+ row2_TD2.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN, ("center"
+ .equalsIgnoreCase(controlsVerticalAlign) ? "middle"
+ : controlsVerticalAlign));
+ row2_TD2.appendChild(buttonsDiv);
// --------------------------------------------
@@ -268,7 +243,7 @@
.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"dr-table rich-table "
+ (tableClass == null ? "" : tableClass));
-
+
// Encode colgroup definition.
ArrayList<Element> columns = getColumns(sourceElement);
int columnsLength = getColumnsCount(sourceElement, columns);
@@ -395,8 +370,7 @@
nsIDOMElement btnImg = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
-
-
+
String path = RichFacesTemplatesActivator.getPluginResourcePath()
+ imgPath;
btnImg.setAttribute("src", "file://" + path);
@@ -412,7 +386,8 @@
.createElement(HtmlComponentUtil.HTML_TAG_TD);
row1_TD1.appendChild(btnImg);
- row1_TD2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"dr-control-buttons");
+ row1_TD2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-control-buttons");
row1_TD2.appendChild(visualDocument.createTextNode(btnName));
row1.appendChild(row1_TD1);
@@ -426,7 +401,43 @@
return btn;
}
+
+ private nsIDOMElement createButtonDiv(nsIDOMDocument visualDocument,
+ String btnName, String imgName, boolean showButtonLabels) {
+
+ nsIDOMElement div1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ nsIDOMElement div2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ nsIDOMElement a = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_A);
+ nsIDOMElement div3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ nsIDOMElement img = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+
+ div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"rich-ordering-control");
+ div2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"rich-ordering-list-button");
+ div2.setAttribute("onmouseover",
"this.className='rich-ordering-list-button-light'");
+
+ a.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"rich-ordering-list-button-selection");
+ div3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"rich-ordering-list-button-content");
+
+ String resourceFolder = RichFacesTemplatesActivator.getPluginResourcePath();
+ img.setAttribute("src", "file://" + resourceFolder + imgName);
+
+ String divStyle = "background-image: url(file://" + resourceFolder +
BUTTON_BG + ");";
+ div2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
+ div1.appendChild(div2);
+ div2.appendChild(a);
+ a.appendChild(div3);
+ div3.appendChild(img);
+ div3.appendChild(visualDocument.createTextNode(btnName));
+
+ return div1;
+ }
+
/**
*
* @param creationData