Author: dmaliarevich
Date: 2008-10-15 12:23:38 -0400 (Wed, 15 Oct 2008)
New Revision: 10861
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dropDownMenu/list-bg.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/arrow.gif
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/list-bg.png
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dropDownMenu/dropDownMenu.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/menuGroup.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuItem/menuItem.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
JBIDE-2497, items value creation was updated, folder icon was added to menuGroup, css
styles were updated.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dropDownMenu/dropDownMenu.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dropDownMenu/dropDownMenu.css 2008-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dropDownMenu/dropDownMenu.css 2008-10-15
16:23:38 UTC (rev 10861)
@@ -20,40 +20,56 @@
font-weight:bold;
}
.rich-menu-list-border {
-
+ font-family:Arial,Verdana,sans-serif;
+ background-color:#F1EEE9;
+ border-color:#C4C0B9;
+ border:1px solid;
}
.rich-menu-list-bg {
-
+ background:transparent none repeat-y scroll left center;
+ background-image:url(list-bg.png);
+ background-color:#F1EEE9;
}
-[vpe-ddm-menu-ul] {
+[vpe-ddm-menu-ul],
+[vpe-ddm-menu-title-ul],
+[vpe-ddm-menu-children-ul] {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
display: block;
+ cursor: pointer;
}
-[vpe-ddm-menu-li] {
+[vpe-ddm-menu-li],
+[vpe-ddm-menu-title-li] {
position: relative;
- height: 30px;
+ height: 20px;
}
-[vpe-ddm-menu-li] ul {
+[vpe-ddm-menu-li] ul,
+[vpe-ddm-menu-title-li] ul {
position: absolute;
left: 149px; /* Set 1px less than menu width */
top: 0;
display: none;
}
-[vpe-ddm-menu-li] div { /* ddm item/group div */
-
+/*
+* Droping-down for top menu elements
+*/
+[vpe-ddm-menu-title-ul]:hover > li,
+[vpe-ddm-menu-title-ul]:hover > li > ul,
+[vpe-ddm-menu-title-ul]:hover > li > ul > li {
+ display: block;
}
-[vpe-ddm-menu-li] div:hover {
-
-}
-[vpe-ddm-menu-ul]:hover {
-
-}
-/*drop-down mechanism*/
+/*
+* Droping-down for nested items
+*/
[vpe-ddm-menu-li]:hover > ul,
[vpe-ddm-menu-li]:hover > li {
display: block;
}
+.dr-menu-top-div {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
\ No newline at end of file
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dropDownMenu/list-bg.png
(from rev 10844,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/list-bg.png)
===================================================================
(Binary files differ)
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/arrow.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/arrow.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Deleted:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/list-bg.png
===================================================================
(Binary files differ)
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/menuGroup.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/menuGroup.css 2008-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuGroup/menuGroup.css 2008-10-15
16:23:38 UTC (rev 10861)
@@ -7,7 +7,8 @@
padding-left: 10px; /*padding for group icon*/
}
.rich-menu-group-folder {
-
+ padding-left: 10px; /*padding for group folder icon*/
+ padding-right: 10px; /*padding for group folder icon*/
}
.rich-menu-group-over {
@@ -32,28 +33,18 @@
}
.rich-menu-item-icon-enabled {
border:0pt solid transparent;
- /*padding:2px 10px 2px 2px;*/
}
.rich-menu-item-icon-selected {
}
.rich-menu-list-border {
- font-family:Arial,Verdana,sans-serif;
- background-color:#F1EEE9;
- border-color:#C4C0B9;
- border:1px solid;
+
}
.rich-menu-list-bg {
- background:transparent none repeat-y scroll left center;
- background-image:url(list-bg.png);
- background-color:#F1EEE9;
- border-left-color:#C4C0B9;
- border-right-color:#C4C0B9;
- border-top-color:#C4C0B9;
- border-left-style:solid;
- border-left-width:1px;
- border-right-style:solid;
- border-right-width:1px;
- border-top-style:solid;
- border-top-width:1px;
+
+}
+.dr-menu-group-top-div {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuItem/menuItem.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuItem/menuItem.css 2008-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/menuItem/menuItem.css 2008-10-15
16:23:38 UTC (rev 10861)
@@ -1,7 +1,5 @@
.rich-menu-item {
font-family:Arial,Verdana,sans-serif;
- border-color:#C4C0B9;
- border:1px solid;
}
.rich-menu-item-label {
/*padding-left: 10px;*/ /*padding for item icon*/
@@ -37,3 +35,8 @@
.rich-menu-item-icon-selected {
}
+.dr-menu-item-top-div {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2008-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2008-10-15
16:23:38 UTC (rev 10861)
@@ -29,24 +29,25 @@
public class RichFacesDropDownMenuTemplate extends VpeAbstractTemplate {
/*
- * Public constants for drop down mechanism.
- */
- public final static String MENU_PARENT_ID = "vpe-ddm-menu-ul"; //$NON-NLS-1$
- public final static String MENU_CHILD_ID = "vpe-ddm-menu-li"; //$NON-NLS-1$
-
- /*
* rich:dropDownMenu constants
*/
- private final static String COMPONENT_NAME = "dropDownMenu"; //$NON-NLS-1$
- private final static String STYLE_PATH = "dropDownMenu/dropDownMenu.css";
//$NON-NLS-1$
- private final static String CHILD_GROUP_NAME = ":menuGroup"; //$NON-NLS-1$
- private final static String CHILD_ITEM_NAME = ":menuItem"; //$NON-NLS-1$
+ private static final String COMPONENT_NAME = "dropDownMenu"; //$NON-NLS-1$
+ private static final String STYLE_PATH = "dropDownMenu/dropDownMenu.css";
//$NON-NLS-1$
+ private static final String CHILD_GROUP_NAME = ":menuGroup"; //$NON-NLS-1$
+ private static final String CHILD_ITEM_NAME = ":menuItem"; //$NON-NLS-1$
private static final String LABEL_FACET_NAME = "label"; //$NON-NLS-1$
private static final String DEFAULT_DDM_TITLE = "ddm"; //$NON-NLS-1$
private static final String EMPTY = ""; //$NON-NLS-1$
private static final String SPACE = " "; //$NON-NLS-1$
/*
+ * Constants for drop down mechanism.
+ */
+ private static final String MENU_TOP_ID = "vpe-ddm-menu-title-ul";
//$NON-NLS-1$
+ private static final String MENU_TOP_ITEM_ID = "vpe-ddm-menu-title-li";
//$NON-NLS-1$
+ private static final String MENU_CHILDREN_LIST_ID =
"vpe-ddm-menu-children-ul"; //$NON-NLS-1$
+
+ /*
* rich:dropDownMenu css styles names
*/
private static final String CSS_RICH_DDMENU_LABEL = "rich-ddmenu-label";
//$NON-NLS-1$
@@ -58,6 +59,7 @@
private static final String CSS_RICH_MENU_LIST_BG = "rich-menu-list-bg";
//$NON-NLS-1$
private static final String CSS_RICH_DDEMENU_LIST_DIV_STYLE = "";
//$NON-NLS-1$
private static final String CSS_RICH_DDEMENU_BORDER_DIV_STYLE = "";
//$NON-NLS-1$
+ private static final String CSS_MENU_TOP_DIV = "dr-menu-top-div";
//$NON-NLS-1$
/*
* rich:dropDownMenu attributes names
@@ -116,7 +118,6 @@
nsIDOMElement ddmMainUL;
nsIDOMElement ddmMainLI;
nsIDOMElement ddmChildrenUL;
-
nsIDOMElement ddmLabelDiv;
nsIDOMElement ddmTextSpan;
nsIDOMText ddmLabelText;
@@ -127,7 +128,6 @@
/*
* Creating visual elements
*/
-
ddmMainUL = visualDocument.createElement(HTML.TAG_UL);
ddmMainLI = visualDocument.createElement(HTML.TAG_LI);
ddmChildrenUL = visualDocument.createElement(HTML.TAG_UL);
@@ -147,21 +147,15 @@
// ddmLabelDiv.appendChild(ddmListDiv);
ddmListDiv.appendChild(ddmListBorderDiv);
ddmListBorderDiv.appendChild(ddmListBgDiv);
-
ddmMainUL.appendChild(ddmMainLI);
ddmMainLI.appendChild(ddmLabelDiv);
/*
- * Children <ul> will be added only if there are some of them.
- */
-// ddmMainLI.appendChild(ddmChildrenUL);
-
- /*
* Setting attributes for the drop-down mechanism
*/
- ddmMainUL.setAttribute(MENU_PARENT_ID, EMPTY);
- ddmMainLI.setAttribute(MENU_CHILD_ID, EMPTY);
- ddmChildrenUL.setAttribute(MENU_PARENT_ID, EMPTY);
+ ddmMainUL.setAttribute(MENU_TOP_ID, EMPTY);
+ ddmMainLI.setAttribute(MENU_TOP_ITEM_ID, EMPTY);
+ ddmChildrenUL.setAttribute(MENU_CHILDREN_LIST_ID, EMPTY);
/*
* Setting css classes
@@ -169,7 +163,8 @@
String labelDivClass = EMPTY;
String listBorderDivClass = EMPTY;
- labelDivClass += SPACE + CSS_RICH_DDMENU_LABEL + SPACE +
CSS_RICH_DDMENU_LABEL_UNSELECT;
+ labelDivClass += SPACE + CSS_RICH_DDMENU_LABEL + SPACE
+ + CSS_RICH_DDMENU_LABEL_UNSELECT;
listBorderDivClass += SPACE + CSS_RICH_MENU_LIST_BORDER;
if (attrPresents(ddm_styleClass)) {
@@ -177,12 +172,14 @@
listBorderDivClass += SPACE + ddm_styleClass;
}
-// ddmLabelDiv.setAttribute(HTML.CLASS_ATTR, labelDivClass);
+// ddmLabelDiv.setAttribute(HTML.ATTR_CLASS, labelDivClass);
+ ddmLabelDiv.setAttribute(HTML.ATTR_CLASS, CSS_MENU_TOP_DIV);
ddmMainLI.setAttribute(HTML.ATTR_CLASS, labelDivClass);
ddmTextSpan.setAttribute(HTML.ATTR_CLASS, CSS_RICH_LABEL_TEXT_DECOR);
// ddmListBorderDiv.setAttribute(HTML.ATTR_CLASS, listBorderDivClass);
// ddmListBgDiv.setAttribute(HTML.ATTR_CLASS, CSS_RICH_MENU_LIST_BG);
- ddmChildrenUL.setAttribute(HTML.ATTR_CLASS, listBorderDivClass + SPACE +
CSS_RICH_MENU_LIST_BG);
+ ddmChildrenUL.setAttribute(HTML.ATTR_CLASS, listBorderDivClass + SPACE
+ + CSS_RICH_MENU_LIST_BG);
/*
* Setting css styles
*/
@@ -197,11 +194,13 @@
cssLabelDivStyle += SPACE + ddm_style;
}
-// ddmListDiv.setAttribute(HTML.STYLE_ATTR, cssListDivStyle);
-// ddmListBorderDiv.setAttribute(HTML.STYLE_ATTR, cssListBorderDivStyle);
-// ddmLabelDiv.setAttribute(HTML.STYLE_ATTR, cssLabelDivStyle);
- ddmMainLI.setAttribute(HTML.ATTR_STYLE, cssListDivStyle + SPACE + cssListBorderDivStyle
+ SPACE + cssLabelDivStyle);
- ddmChildrenUL.setAttribute(HTML.ATTR_STYLE, cssListDivStyle + SPACE +
cssListBorderDivStyle + SPACE + cssLabelDivStyle);
+// ddmListDiv.setAttribute(HTML.ATTR_STYLE, cssListDivStyle);
+// ddmListBorderDiv.setAttribute(HTML.ATTR_STYLE, cssListBorderDivStyle);
+// ddmLabelDiv.setAttribute(HTML.ATTR_STYLE, cssLabelDivStyle);
+ ddmMainLI.setAttribute(HTML.ATTR_STYLE, cssListDivStyle + SPACE
+ + cssListBorderDivStyle + SPACE + cssLabelDivStyle);
+ ddmChildrenUL.setAttribute(HTML.ATTR_STYLE, cssListDivStyle + SPACE
+ + cssListBorderDivStyle + SPACE + cssLabelDivStyle);
/*
* Encoding label value
*/
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java 2008-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java 2008-10-15
16:23:38 UTC (rev 10861)
@@ -29,22 +29,29 @@
public class RichFacesMenuGroupTemplate extends VpeAbstractTemplate {
- public static final String MENU_GROUP_ID = "MENU-GROUP-ID"; //$NON-NLS-1$
-
/*
* rich:menuGroup constants
*/
- private final static String COMPONENT_NAME = "menuGroup"; //$NON-NLS-1$
- private final static String STYLE_PATH = "menuGroup/menuGroup.css";
//$NON-NLS-1$
+ private static final String COMPONENT_NAME = "menuGroup"; //$NON-NLS-1$
+ private static final String STYLE_PATH = "menuGroup/menuGroup.css";
//$NON-NLS-1$
private static final String SPACER_IMG_PATH = "menuGroup/spacer.gif";
//$NON-NLS-1$
- private final static String CHILD_GROUP_NAME = ":menuGroup"; //$NON-NLS-1$
- private final static String CHILD_ITEM_NAME = ":menuItem"; //$NON-NLS-1$
+ private static final String FOLDER_IMG_PATH = "menuGroup/arrow.gif";
//$NON-NLS-1$
+ private static final String FOLDER_IMG_WIDTH = "16px;"; //$NON-NLS-1$
+ private static final String FOLDER_IMG_HEIGHT = "16px;"; //$NON-NLS-1$
+ private static final String CHILD_GROUP_NAME = ":menuGroup"; //$NON-NLS-1$
+ private static final String CHILD_ITEM_NAME = ":menuItem"; //$NON-NLS-1$
private static final String ICON_FACET_NAME = "icon"; //$NON-NLS-1$
private static final String ICON_DISABLED_FACET_NAME = "iconDisabled";
//$NON-NLS-1$
private static final String EMPTY = ""; //$NON-NLS-1$
private static final String SPACE = " "; //$NON-NLS-1$
/*
+ * Constants for drop down mechanism.
+ */
+ private static final String MENU_PARENT_ID = "vpe-ddm-menu-ul"; //$NON-NLS-1$
+ private static final String MENU_CHILD_ID = "vpe-ddm-menu-li"; //$NON-NLS-1$
+
+ /*
* rich:menuGroup css styles names
*/
private static final String CSS_RICH_MENU_GROUP = "rich-menu-group";
//$NON-NLS-1$
@@ -63,6 +70,7 @@
private static final String CSS_RICH_MENU_LIST_BG = "rich-menu-list-bg";
//$NON-NLS-1$
private static final String CSS_RICH_LIST_FOLDER_DIV_STYLE = "";
//$NON-NLS-1$
private static final String CSS_RICH_LIST_BORDER_DIV_STYLE = "";
//$NON-NLS-1$
+ private static final String CSS_MENU_GROUP_TOP_DIV = "dr-menu-group-top-div";
//$NON-NLS-1$
/*
* rich:menuGroup attributes names
@@ -123,9 +131,10 @@
nsIDOMElement grTopDiv;
nsIDOMElement grImgSpan;
nsIDOMElement grImg;
+ nsIDOMElement grFolderImg;
nsIDOMElement grLabelSpan;
nsIDOMText grLabelText;
- nsIDOMElement grFolderDiv;
+ nsIDOMElement grFolderImgSpan;
nsIDOMElement grListBorderDiv;
nsIDOMElement grListBgDiv;
@@ -137,9 +146,10 @@
grTopDiv = visualDocument.createElement(HTML.TAG_DIV);
grImgSpan = visualDocument.createElement(HTML.TAG_SPAN);
grImg = visualDocument.createElement(HTML.TAG_IMG);
+ grFolderImg = visualDocument.createElement(HTML.TAG_IMG);
grLabelSpan = visualDocument.createElement(HTML.TAG_SPAN);
grLabelText = visualDocument.createTextNode(EMPTY);
- grFolderDiv = visualDocument.createElement(HTML.TAG_DIV);
+ grFolderImgSpan = visualDocument.createElement(HTML.TAG_SPAN);
grListBorderDiv = visualDocument.createElement(HTML.TAG_DIV);
grListBgDiv = visualDocument.createElement(HTML.TAG_DIV);
creationData = new VpeCreationData(grMainLI);
@@ -150,21 +160,16 @@
grTopDiv.appendChild(grImgSpan);
grTopDiv.appendChild(grLabelSpan);
grLabelSpan.appendChild(grLabelText);
-// grTopDiv.appendChild(grFolderDiv);
+ grTopDiv.appendChild(grFolderImgSpan);
// grFolderDiv.appendChild(grListBorderDiv);
// grListBorderDiv.appendChild(grListBgDiv);
grMainLI.appendChild(grTopDiv);
-
+
/*
- * Children <ul> will be added only if there are some of them.
- */
-// grMainLI.appendChild(grChildrenUL);
-
- /*
* Setting attributes for the drop-down mechanism
*/
- grMainLI.setAttribute(RichFacesDropDownMenuTemplate.MENU_CHILD_ID, EMPTY);
- grChildrenUL.setAttribute(RichFacesDropDownMenuTemplate.MENU_PARENT_ID, EMPTY);
+ grMainLI.setAttribute(MENU_CHILD_ID, EMPTY);
+ grChildrenUL.setAttribute(MENU_PARENT_ID, EMPTY);
/*
* Setting css classes
@@ -190,14 +195,16 @@
labelSpanClass += SPACE + mg_labelClass;
}
-// grTopDiv.setAttribute(HTML.CLASS_ATTR, topDivClass);
+// grTopDiv.setAttribute(HTML.ATTR_CLASS, topDivClass);
+ grTopDiv.setAttribute(HTML.ATTR_CLASS, CSS_MENU_GROUP_TOP_DIV);
grMainLI.setAttribute(HTML.ATTR_CLASS, topDivClass);
grImgSpan.setAttribute(HTML.ATTR_CLASS, imgSpanClass);
grLabelSpan.setAttribute(HTML.ATTR_CLASS, labelSpanClass);
-// grFolderDiv.setAttribute(HTML.ATTR_CLASS, folderDivClass);
+ grFolderImgSpan.setAttribute(HTML.ATTR_CLASS, folderDivClass);
// grListBorderDiv.setAttribute(HTML.ATTR_CLASS, CSS_RICH_MENU_LIST_BORDER);
// grListBgDiv.setAttribute(HTML.ATTR_CLASS, CSS_RICH_MENU_LIST_BG);
- grChildrenUL.setAttribute(HTML.ATTR_CLASS, folderDivClass + SPACE +
CSS_RICH_MENU_LIST_BORDER + SPACE + CSS_RICH_MENU_LIST_BG);
+ grChildrenUL.setAttribute(HTML.ATTR_CLASS, CSS_RICH_MENU_LIST_BORDER
+ + SPACE + CSS_RICH_MENU_LIST_BG);
/*
* Setting css styles
*/
@@ -207,11 +214,12 @@
topDivStyle += SPACE + mg_style;
}
-// grTopDiv.setAttribute(HTML.STYLE_ATTR, topDivStyle);
grMainLI.setAttribute(HTML.ATTR_STYLE, topDivStyle);
-// grFolderDiv.setAttribute(HTML.ATTR_STYLE, CSS_RICH_LIST_FOLDER_DIV_STYLE);
+ grFolderImgSpan.setAttribute(HTML.ATTR_STYLE, CSS_RICH_LIST_FOLDER_DIV_STYLE);
// grListBorderDiv.setAttribute(HTML.ATTR_STYLE, CSS_RICH_LIST_BORDER_DIV_STYLE);
- grChildrenUL.setAttribute(HTML.ATTR_STYLE, CSS_RICH_LIST_FOLDER_DIV_STYLE + SPACE +
CSS_RICH_LIST_BORDER_DIV_STYLE);
+// grChildrenUL.setAttribute(HTML.ATTR_STYLE,
+// CSS_RICH_LIST_FOLDER_DIV_STYLE + SPACE
+// + CSS_RICH_LIST_BORDER_DIV_STYLE);
/*
* Encode label value
@@ -231,12 +239,11 @@
childInfo.addSourceChild(iconFacet);
creationData.addChildrenInfo(childInfo);
} else {
- String iconPath = sourceElement.getAttribute(ICON);
- if (attrPresents(iconPath)) {
+ if (attrPresents(mg_icon)) {
/*
* Add path to specified image
*/
- String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(iconPath, pageContext, true);
+ String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(mg_icon, pageContext, true);
grImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
} else {
/*
@@ -252,6 +259,26 @@
}
/*
+ * Add group folder icon
+ */
+ if (attrPresents(mg_iconFolder)) {
+ /*
+ * Add path to specified image
+ */
+ String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(mg_iconFolder, pageContext,
true);
+ grFolderImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
+ } else {
+ /*
+ * Create default arrow image
+ */
+ ComponentUtil.setImg(grFolderImg, FOLDER_IMG_PATH);
+ }
+ /*
+ * Add image to group folder div
+ */
+ grFolderImgSpan.appendChild(grFolderImg);
+
+ /*
* Adding child nodes:
* <rich:menuGroup> and <rich:menuItem> only.
*/
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java 2008-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java 2008-10-15
16:23:38 UTC (rev 10861)
@@ -29,11 +29,12 @@
public class RichFacesMenuItemTemplate extends VpeAbstractTemplate {
+
/*
* rich:menuItem constants
*/
- private final static String COMPONENT_NAME = "menuItem"; //$NON-NLS-1$
- private final static String STYLE_PATH = "menuItem/menuItem.css";
//$NON-NLS-1$
+ private static final String COMPONENT_NAME = "menuItem"; //$NON-NLS-1$
+ private static final String STYLE_PATH = "menuItem/menuItem.css";
//$NON-NLS-1$
private static final String SPACER_IMG_PATH = "menuItem/spacer.gif";
//$NON-NLS-1$
private static final String ICON_FACET_NAME = "icon"; //$NON-NLS-1$
private static final String ICON_DISABLED_FACET_NAME = "iconDisabled";
//$NON-NLS-1$
@@ -41,6 +42,11 @@
private static final String SPACE = " "; //$NON-NLS-1$
/*
+ * Constants for drop down mechanism.
+ */
+ private static final String MENU_CHILD_ID = "vpe-ddm-menu-li"; //$NON-NLS-1$
+
+ /*
* rich:menuItem css styles names
*/
private static final String CSS_RICH_MENU_ITEM = "rich-menu-item";
//$NON-NLS-1$
@@ -55,6 +61,7 @@
private static final String CSS_RICH_MENU_ITEM_ICON_ENABLED =
"rich-menu-item-icon-enabled"; //$NON-NLS-1$
private static final String CSS_RICH_MENU_ITEM_LABEL_SELECTED =
"rich-menu-item-label-selected"; //$NON-NLS-1$
private static final String CSS_RICH_MENU_ITEM_ICON_SELECTED =
"rich-menu-item-icon-selected"; //$NON-NLS-1$
+ private static final String CSS_MENU_ITEM_TOP_DIV = "dr-menu-item-top-div";
//$NON-NLS-1$
/*
* rich:menuItem attributes names
@@ -128,11 +135,10 @@
itemLabelSpan.appendChild(itemLabelText);
itemMainLI.appendChild(itemTopDiv);
-
/*
* Setting attributes for the drop-down mechanism
*/
- itemMainLI.setAttribute(RichFacesDropDownMenuTemplate.MENU_CHILD_ID, EMPTY);
+ itemMainLI.setAttribute(MENU_CHILD_ID, EMPTY);
/*
* Setting css classes
@@ -156,6 +162,7 @@
}
// itemTopDiv.setAttribute(HTML.ATTR_CLASS, topDivClass);
+ itemTopDiv.setAttribute(HTML.ATTR_CLASS, CSS_MENU_ITEM_TOP_DIV);
itemMainLI.setAttribute(HTML.ATTR_CLASS, topDivClass);
itemIconImgSpan.setAttribute(HTML.ATTR_CLASS, iconImgSpanClass);
itemLabelSpan.setAttribute(HTML.ATTR_CLASS, labelSpanClass);
@@ -200,7 +207,6 @@
* Add image to span
*/
itemIconImgSpan.appendChild(itemIconImg);
-
}
/*
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-10-15
16:23:34 UTC (rev 10860)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-10-15
16:23:38 UTC (rev 10861)
@@ -529,10 +529,6 @@
<vpe:tag name="rich:dropDownMenu" case-sensitive="yes" >
<vpe:template
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesDropDownMenuTemplate"
children="yes" modify="no">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
<vpe:drop container="no"/>
@@ -543,10 +539,6 @@
<vpe:tag name="rich:menuItem" case-sensitive="yes" >
<vpe:template
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesMenuItemTemplate"
children="yes" modify="no">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
<vpe:drop container="no"/>
@@ -557,10 +549,6 @@
<vpe:tag name="rich:menuGroup" case-sensitive="yes" >
<vpe:template
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesMenuGroupTemplate"
children="yes" modify="no">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
<vpe:drop container="no"/>