Author: Alex.Kolonitsky
Date: 2010-11-29 05:02:29 -0500 (Mon, 29 Nov 2010)
New Revision: 20205
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
Modified:
trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js
trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js
trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
Log:
RF-9317 panelMenu components
Modified: trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js 2010-11-29 09:59:46
UTC (rev 20204)
+++ trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js 2010-11-29 10:02:29
UTC (rev 20205)
@@ -48,6 +48,7 @@
this.options = $.extend({}, __DEFAULT_OPTIONS, options || {});
this.activeItem = this.__getValueInput().value;
+ this.nestingLevel = 0;
var menuGroup = this;
if (menuGroup.options.expandSingle) {
@@ -178,12 +179,14 @@
/***************************** Private Methods
****************************************************************/
+
+
__panelMenu : function () {
return $(rf.getDomElement(this.id));
},
__childGroups : function () {
- return this.__panelMenu().children(".rf-pm-gr")
+ return this.__panelMenu().children(".rf-pm-top-gr")
},
/**
Modified: trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js 2010-11-29
09:59:46 UTC (rev 20204)
+++ trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js 2010-11-29
10:02:29 UTC (rev 20205)
@@ -254,14 +254,6 @@
},
/***************************** Private Methods
****************************************************************/
- __parentGroup : function () {
- var parentGroup = this.__group().parents(".rf-pm-gr")[0];
- if (parentGroup) {
- return parentGroup;
- }
- return this.__panelMenu();
- },
-
__childGroups : function () {
return this.__content().children(".rf-pm-gr")
},
@@ -304,7 +296,7 @@
__changeState : function () {
var state = {};
- state["expanded"] =
this.__setExpandValue(this.__getExpandValue());
+ state["expanded"] =
this.__setExpandValue(!this.__getExpandValue());
if (this.options.selectable) {
state["itemName"] =
this.__rfPanelMenu().selectedItem(this.itemName); // TODO bad function name for function
which change component state
}
Modified: trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js 2010-11-29
09:59:46 UTC (rev 20204)
+++ trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js 2010-11-29
10:02:29 UTC (rev 20205)
@@ -31,7 +31,8 @@
mode: "client",
unselectable: false,
highlight: true,
- stylePrefix: "rf-pm-itm"
+ stylePrefix: "rf-pm-itm",
+ itemStep: 20
};
var SELECT_ITEM = {
@@ -157,6 +158,11 @@
}
}
+ item = this;
+ $(this.__panelMenu()).ready(function () {
+ item.__renderNestingLevel();
+ });
+
this.__addUserEventHandler("select");
},
@@ -212,6 +218,36 @@
},
/***************************** Private Methods
****************************************************************/
+ __rfParentItem : function () {
+ var res = this.__item().parents(".rf-pm-gr")[0];
+ if (!res) {
+ res = this.__item().parents(".rf-pm-top-gr")[0];
+ }
+
+ if (!res) {
+ res = this.__panelMenu();
+ }
+
+ return res ? rf.$(res) : null;
+ },
+
+ __getNestingLevel : function () {
+ if (!this.nestingLevel) {
+ var parentItem = this.__rfParentItem();
+ if (parentItem && parentItem.__getNestingLevel) {
+ this.nestingLevel = parentItem.__getNestingLevel() + 1;
+ } else {
+ this.nestingLevel = 0;
+ }
+ }
+
+ return this.nestingLevel;
+ },
+
+ __renderNestingLevel : function () {
+ this.__item().find("td").first().css("padding-left",
this.options.itemStep * this.__getNestingLevel());
+ },
+
__panelMenu : function () {
return this.__item().parents(".rf-pm")[0];
},
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -25,6 +25,7 @@
import org.richfaces.PanelMenuMode;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
/**
@@ -37,10 +38,64 @@
public static final String COMPONENT_FAMILY =
"org.richfaces.PanelMenuItem";
+ public enum Icons {
+ disc("rf-pm-disc"),
+ grid("rf-pm-grid"),
+ chevron("rf-pm-chevron"),
+ chevronUp("rf-pm-chevron-up"),
+ chevronDown("rf-pm-chevron-down"),
+ triangle("rf-pm-triangle"),
+ triangleUp("rf-pm-triangle-up"),
+ triangleDown("rf-pm-triangle-down");
+
+ public static final Icons DEFAULT = grid;
+
+ private final String cssClass;
+
+ Icons(String cssClass) {
+ this.cssClass = cssClass;
+ }
+
+ public String cssClass() {
+ return cssClass;
+ }
+ }
+
protected AbstractPanelMenuItem() {
setRendererType("org.richfaces.PanelMenuItem");
}
+ public boolean isTopItem() {
+ return getParentItem() instanceof AbstractPanelMenu;
+ }
+
+ public AbstractPanelMenu getPanelMenu() { // TODO refactor
+ UIComponent parentItem = getParent();
+ while (parentItem != null) {
+ if (parentItem instanceof AbstractPanelMenu) {
+ return (AbstractPanelMenu) parentItem;
+ }
+
+ parentItem = parentItem.getParent();
+ }
+
+ return null;
+ }
+
+ public UIComponent getParentItem() {
+ UIComponent parentItem = getParent();
+ while (parentItem != null) {
+ if (parentItem instanceof AbstractPanelMenuGroup
+ || parentItem instanceof AbstractPanelMenu) {
+ return parentItem;
+ }
+
+ parentItem = parentItem.getParent();
+ }
+
+ return null;
+ }
+
@Override
public String getFamily() {
return COMPONENT_FAMILY;
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -46,7 +46,7 @@
}
public String getIcon() {
- return (String) getStateHelper().eval(PropertyKeys.icon);
+ return (String) getStateHelper().eval(PropertyKeys.icon,
Icons.DEFAULT.toString());
}
public void setIcon(String icon) {
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -10,7 +10,7 @@
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * buticon WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -26,6 +26,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractPanelMenuGroup;
+import org.richfaces.component.AbstractPanelMenuItem;
import org.richfaces.component.html.HtmlPanelMenuGroup;
import org.richfaces.renderkit.HtmlConstants;
@@ -52,8 +53,9 @@
public static final String BEFORE_COLLAPSE = "beforecollapse";
public static final String BEFORE_EXPAND = "beforeexpand";
public static final String BEFORE_SWITCH = "beforeswitch";
+ private static final String CSS_CLASS_PREFIX = "rf-pm-gr";
+ private static final String TOP_CSS_CLASS_PREFIX = "rf-pm-top-gr";
-
@Override
protected void doDecode(FacesContext context, UIComponent component) {
AbstractPanelMenuGroup menuGroup = (AbstractPanelMenuGroup) component;
@@ -106,15 +108,22 @@
private void encodeHeader(ResponseWriter writer, FacesContext context,
HtmlPanelMenuGroup menuGroup) throws IOException {
writer.startElement("div", null);
writer.writeAttribute("id", menuGroup.getClientId(context) +
":hdr", null);
- writer.writeAttribute("class", "rf-pm-gr-hdr", null);
- writer.writeText(menuGroup.getLabel(), null);
+ writer.writeAttribute("class", getCssClass(menuGroup,
"-hdr"), null);
+ PanelMenuItemRenderer.encodeHeaderGroup(writer, context, menuGroup,
getCssClass(menuGroup, ""));
+// writer.writeText(menuGroup.getLabel(), null);
writer.endElement("div");
}
+ public String getCssClass(AbstractPanelMenuItem item, String postfix) {
+ return (item.isTopItem() ? TOP_CSS_CLASS_PREFIX : CSS_CLASS_PREFIX) + postfix;
+ }
+
private void encodeContentBegin(ResponseWriter writer, FacesContext context,
HtmlPanelMenuGroup menuGroup) throws IOException {
writer.startElement("div", null);
writer.writeAttribute("id", menuGroup.getClientId(context) +
":cnt", null);
- writer.writeAttribute("class", concatClasses("rf-pm-gr-cnt",
menuGroup.isExpanded() ? "rf-pm-exp" : "rf-pm-colps"), null);
+ writer.writeAttribute("class", concatClasses(getCssClass(menuGroup,
"-cnt"), menuGroup.isExpanded() ? "rf-pm-exp" :
"rf-pm-colps"), null);
+
+ writeJavaScript(writer, context, menuGroup);
}
private void encodeContentEnd(ResponseWriter writer, FacesContext context,
UIComponent component) throws IOException {
@@ -123,7 +132,7 @@
@Override
protected String getStyleClass(UIComponent component) {
- return concatClasses("rf-pm-gr", attributeAsString(component,
"styleClass"));
+ return concatClasses(getCssClass((AbstractPanelMenuItem) component,
""), attributeAsString(component, "styleClass"));
}
@Override
@@ -160,7 +169,7 @@
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
encodeContentEnd(writer, context, component);
- super.doEncodeEnd(writer, context, component);
+ writer.endElement(HtmlConstants.DIV_ELEM);
}
@Override
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -26,6 +26,9 @@
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractPanelMenuItem;
import org.richfaces.component.html.HtmlPanelMenuItem;
+import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.renderkit.HtmlConstants;
+import org.richfaces.renderkit.RenderKitUtils;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -34,7 +37,6 @@
import java.util.HashMap;
import java.util.Map;
-import static org.richfaces.component.util.HtmlUtil.concatClasses;
import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
@@ -47,17 +49,57 @@
public static final String UNSELECT = "unselect";
public static final String SELECT = "select";
public static final String BEFORE_SELECT = "beforeselect";
+
+ private static final String CSS_CLASS_PREFIX = "rf-pm-itm";
@Override
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
super.doEncodeBegin(writer, context, component);
- writer.writeText(((AbstractPanelMenuItem) component).getLabel(), null);
+ encodeHeaderGroup(writer, context, (AbstractPanelMenuItem) component,
CSS_CLASS_PREFIX);
}
+ static void encodeHeaderGroup(ResponseWriter writer, FacesContext context,
AbstractPanelMenuItem menuItem, String classPrefix) throws IOException {
+ writer.startElement("table", null);
+ writer.writeAttribute("class", classPrefix + "-gr", null);
+ writer.startElement("tr", null);
+
+ encodeTdIcon(writer, context, classPrefix, menuItem.getIcon());
+
+ writer.startElement("td", null);
+ writer.writeAttribute("class", classPrefix + "-lbl", null);
+ writer.writeText(menuItem.getLabel(), null);
+ writer.endElement("td");
+
+ writer.startElement("td", null);
+ writer.writeAttribute("class", HtmlUtil.concatClasses(classPrefix +
"-exp-ico", "rf-pm-triangle-down"), null);
+ writer.endElement("td");
+
+ writer.endElement("tr");
+ writer.endElement("table");
+ }
+
+ private static void encodeTdIcon(ResponseWriter writer, FacesContext context, String
classPrefix, String attrIconValue) throws IOException {
+ writer.startElement("td", null);
+ try {
+ AbstractPanelMenuItem.Icons icon =
AbstractPanelMenuItem.Icons.valueOf(attrIconValue);
+ writer.writeAttribute("class", HtmlUtil.concatClasses(classPrefix +
"-ico", icon.cssClass()), null);
+ } catch (IllegalArgumentException e) {
+ writer.writeAttribute("class", classPrefix + "-ico",
null);
+ if(attrIconValue != null && attrIconValue.trim().length() != 0) {
+ writer.startElement(HtmlConstants.IMG_ELEMENT, null);
+ writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null);
+ writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE,
RenderKitUtils.getResourceURL(attrIconValue, context), null);
+ writer.endElement(HtmlConstants.IMG_ELEMENT);
+ }
+ }
+
+ writer.endElement("td");
+ }
+
@Override
protected String getStyleClass(UIComponent component) {
- return concatClasses("rf-pm-itm", attributeAsString(component,
"styleClass"));
+ return concatClasses(CSS_CLASS_PREFIX, attributeAsString(component,
"styleClass"));
}
@Override
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,88 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.AbstractJava2DUserResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+import javax.faces.context.FacesContext;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelMenuIconBasic extends AbstractJava2DUserResource implements
StateHolderResource {
+ private static final String TOP_BULLET_COLOR = Skin.HEADER_TEXT_COLOR;
+ private static final String ORDINAL_BULLET_COLOR = Skin.HEADER_BACKGROUND_COLOR;
+
+ private static final Dimension DIMENSION = new Dimension(16, 16);
+
+ private Color color;
+ private Color topBulletColor;
+ private Color ordinalBulletColor;
+
+ protected PanelMenuIconBasic() {
+ super(DIMENSION);
+ }
+
+ public void paint(Graphics2D graphics2D) {
+ if (color == null || graphics2D == null) {
+ return;
+ }
+
+ graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING,
RenderingHints.VALUE_DITHER_ENABLE);
+ graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
+
+ paintImage(graphics2D, color);
+ }
+
+ protected abstract void paintImage(Graphics2D g2d, Color color);
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws
IOException {
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ dataOutput.writeInt(skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR));
+ dataOutput.writeInt(skin.getColorParameter(context, TOP_BULLET_COLOR));
+ dataOutput.writeInt(skin.getColorParameter(context, ORDINAL_BULLET_COLOR));
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException
{
+ color = new Color(dataInput.readInt());
+ topBulletColor = new Color(dataInput.readInt());
+ ordinalBulletColor = new Color(dataInput.readInt());
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevron extends PanelMenuIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+ path.moveTo(1, 1);
+
+ path.lineTo(17, 1);
+ path.lineTo(47, 31);
+ path.lineTo(17, 61);
+ path.lineTo(1, 61);
+ path.lineTo(31, 31);
+ path.closePath();
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelMenuIconChevronBasic extends PanelMenuIconBasic {
+ private static final int BUFFER_IMAGE_SIZE = 128;
+
+ @Override
+ protected void paintImage(Graphics2D graphics2d, Color color) {
+
+ BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE,
BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimension();
+ g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+ g2d.translate(28, 28);
+ g2d.setColor(color);
+
+ GeneralPath path = new GeneralPath();
+ draw(path);
+
+ g2d.fill(path);
+ if (this instanceof PanelMenuIconChevron
+ || this instanceof PanelMenuIconChevronLeft) {
+ g2d.translate(24, 0);
+ } else {
+ g2d.translate(0, 24);
+ }
+ g2d.fill(path);
+
+ AffineTransform transform =
AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE,
dimension.getHeight() / BUFFER_IMAGE_SIZE);
+ AffineTransformOp transformOp = new AffineTransformOp(transform,
AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
+ g2d.dispose();
+ }
+
+ abstract void draw(GeneralPath draw);
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevronDown extends PanelMenuIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(1, 0);
+ path.lineTo(31, 30);
+ path.lineTo(61, 0);
+ path.lineTo(61, 16);
+ path.lineTo(31, 46);
+ path.lineTo(1, 16);
+ path.closePath();
+
+ }
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevronLeft extends PanelMenuIconChevronBasic {
+
+ void draw(GeneralPath path) {
+ path.moveTo(61, 1);
+ path.lineTo(45, 1);
+ path.lineTo(15, 31);
+ path.lineTo(45, 61);
+ path.lineTo(61, 61);
+ path.lineTo(30, 31);
+ path.closePath();
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevronUp extends PanelMenuIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(0, 46);
+ path.lineTo(0, 31);
+ path.lineTo(30, 1);
+ path.lineTo(61, 31);
+ path.lineTo(61, 46);
+ path.lineTo(30, 16);
+ path.closePath();
+
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Ellipse2D;
+
+@DynamicUserResource
+public class PanelMenuIconDisc extends PanelMenuIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ Dimension dimension = getDimension();
+ long dim = Math.round(dimension.getWidth() / 3);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(color);
+ g2d.translate(dim, dim);
+
+ g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+
+@DynamicUserResource
+public class PanelMenuIconGrid extends PanelMenuIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
RenderingHints.VALUE_DITHER_ENABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
+
+ Rectangle2D.Float path = new Rectangle2D.Float();
+ Dimension dimension = getDimension();
+
+ g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE,
BasicStroke.JOIN_BEVEL));
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+ g2d.translate(40, 40);
+
+ path.setRect(0, 0, 40, 40);
+
+ g2d.setColor(color);
+
+ Color bcolor = new Color(1f, 1f, 1f, 0f);
+
+ g2d.setBackground(bcolor);
+ g2d.fill(path);
+ g2d.clearRect(16, 0, 8, 40);
+ g2d.clearRect(0, 16, 40, 8);
+
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+
+@DynamicUserResource
+public class PanelMenuIconSpacer extends PanelMenuIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.*;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangle extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47, 30);
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(33, 34);
+ path.lineTo(0, 67);
+ path.closePath();
+
+ }
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+/**
+ * @author Anton Belevich
+ */
+public abstract class PanelMenuIconTriangleBasic extends PanelMenuIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
RenderingHints.VALUE_DITHER_ENABLE);
+
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimension();
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+
+ draw(path, g2d);
+
+ g2d.setColor(color);
+ g2d.fill(path);
+
+ }
+
+ abstract void draw(GeneralPath path, Graphics2D g2d);
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangleDown extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+
+ g2d.translate(31, 54);
+
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(34, 33);
+ path.lineTo(67, 0);
+ path.closePath();
+
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangleLeft extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47, 30);
+ path.moveTo(33, 0);
+ path.lineTo(0, 33);
+ path.lineTo(0, 34);
+ path.lineTo(33, 67);
+ path.closePath();
+ }
+
+}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangleUp extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(31, 47);
+
+ path.moveTo(0, 33);
+ path.lineTo(33, 0);
+ path.lineTo(34, 0);
+ path.lineTo(67, 33);
+ path.closePath();
+ }
+
+}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-11-29 09:59:46
UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-11-29 10:02:29
UTC (rev 20205)
@@ -769,7 +769,6 @@
<component-class>org.richfaces.component.html.HtmlTab</component-class>
</component>
-<!--
<component>
<component-type>org.richfaces.PanelMenuItem</component-type>
<component-class>org.richfaces.component.html.HtmlPanelMenuItem</component-class>
@@ -949,7 +948,6 @@
<property-class>java.lang.Object</property-class>
</property>
</component>
--->
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
@@ -1021,7 +1019,7 @@
</renderer-extension>
</renderer>
-<!-- <renderer>
+ <renderer>
<component-family>org.richfaces.PanelMenuItem</component-family>
<renderer-type>org.richfaces.PanelMenuItem</renderer-type>
<renderer-class>org.richfaces.renderkit.html.PanelMenuItemRenderer</renderer-class>
@@ -1035,7 +1033,7 @@
<component-family>org.richfaces.PanelMenu</component-family>
<renderer-type>org.richfaces.PanelMenu</renderer-type>
<renderer-class>org.richfaces.renderkit.html.PanelMenuRenderer</renderer-class>
- </renderer>-->
+ </renderer>
<client-behavior-renderer>
<client-behavior-renderer-type>org.richfaces.component.behavior.ToggleControl</client-behavior-renderer-type>
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-11-29 09:59:46 UTC
(rev 20204)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-11-29 10:02:29 UTC
(rev 20205)
@@ -51,7 +51,6 @@
</component>
</tag>
-<!--
<tag>
<tag-name>panelMenuItem</tag-name>
<component>
@@ -659,7 +658,6 @@
</attribute>
</tag>
--->
<tag>
<tag-name>tooltip</tag-name>
@@ -1710,5 +1708,5 @@
<type>java.lang.String</type>
</attribute>
</tag>
-
+
</facelet-taglib>
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2010-11-29
10:02:29 UTC (rev 20205)
@@ -21,52 +21,247 @@
*/
.rf-pm {
- border:1px solid red;
- padding:10px;
}
.rf-pm-itm {
- border:1px solid #ffd700;
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.panelBorderColor}';
+
+ color: '#{richSkin.generalTextColor}';
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ white-space: nowrap;
}
+.rf-pm-itm-gr {
+ width: 100%;
+}
+
+.rf-pm-itm-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-itm-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-itm-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
.rf-pm-itm-hov {
- background-color:#ffd700;
+ background-color: '#{richSkin.additionalBackgroundColor}';
}
.rf-pm-itm-sel {
- background-color:blue;
- color:#f5f5f5;
+ background-color: '#{richSkin.additionalBackgroundColor}';
+ font-style:italic;
}
.rf-pm-gr {
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.panelBorderColor}';
+ margin-bottom: 3px
}
.rf-pm-gr-hov {
- background-color:green;
- color:white;
+ background: '#{richSkin.additionalBackgroundColor}';
+
+ color: white;
}
.rf-pm-gr-sel {
- background-color:blue;
- color:#f5f5f5;
+ background: '#{richSkin.additionalBackgroundColor}';
+ font-style:italic;
}
.rf-pm-gr-hdr {
- border:1px solid green;
- padding:2px;
+ font-weight: bold;
+ color: '#{richSkin.generalTextColor}';
+
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ white-space: nowrap;
}
.rf-pm-gr-cnt {
- border:1px solid yellow;
- padding:2px;
- margin-left: 10px;
}
+.rf-pm-gr-gr {
+ width: 100%;
+}
+
+.rf-pm-gr-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-gr-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-gr-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-itm {
+ color: '#{richSkin.generalTextColor}';
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ white-space: nowrap;
+
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.panelBorderColor}';
+}
+
+.rf-pm-top-itm-gr {
+ width: 100%;
+}
+
+.rf-pm-top-itm-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-itm-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-top-itm-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-itm-hov {
+ background-color:#ffd700;
+}
+
+.rf-pm-top-itm-sel {
+ background: '#{richSkin.additionalBackgroundColor}';
+ font-style:italic;
+}
+
+.rf-pm-top-gr {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
+ margin-bottom: 3px
+}
+
+.rf-pm-top-gr-hov {
+ background-color: green;
+ color: white;
+}
+
+.rf-pm-top-gr-sel {
+ background-color: blue;
+ color: #f5f5f5;
+
+ font-style:italic;
+}
+
+.rf-pm-top-gr-hdr {
+ color: '#{richSkin.headerTextColor}';
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ padding-top: 2px;
+ cursor: pointer;
+ white-space: nowrap;
+
+ background-image:
"url(#{resource['org.richfaces.images:pmenu_bg.png']})";
+ background-position: top left;
+ background-repeat: repeat-x;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ font-weight: bold;
+}
+
+.rf-pm-top-gr-cnt {
+}
+
+.rf-pm-top-gr-gr {
+ width: 100%;
+}
+
+.rf-pm-top-gr-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-gr-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-top-gr-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
.rf-pm-colps {
- display : none;
+ display: none;
}
.rf-pm-exp {
- display : block;
+ display: block;
}
+
+
+/* Icons */
+
+.rf-pm-chevron { background-image:
"url(#{resource['org.richfaces.images:Chevron.png']})" }
+.rf-pm-chevron-down { background-image:
"url(#{resource['org.richfaces.images:ChevronDown.png']})" }
+.rf-pm-chevron-left { background-image:
"url(#{resource['org.richfaces.images:ChevronLeft.png']})" }
+.rf-pm-chevron-up { background-image:
"url(#{resource['org.richfaces.images:ChevronUp.png']})" }
+.rf-pm-disc { background-image:
"url(#{resource['org.richfaces.images:Disc.png']})" }
+.rf-pm-grid { background-image:
"url(#{resource['org.richfaces.images:Grid.png']})" }
+.rf-pm-spacer { background-image:
"url(#{resource['org.richfaces.images:Spacer.png']})" }
+.rf-pm-triangle { background-image:
"url(#{resource['org.richfaces.images:Triangle.png']})" }
+.rf-pm-triangle-down { background-image:
"url(#{resource['org.richfaces.images:TriangleDown.png']})" }
+.rf-pm-triangle-left { background-image:
"url(#{resource['org.richfaces.images:TriangleLeft.png']})" }
+.rf-pm-triangle-up { background-image:
"url(#{resource['org.richfaces.images:TriangleUp.png']})" }
\ No newline at end of file
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-11-29
10:02:29 UTC (rev 20205)
@@ -7,10 +7,35 @@
org.richfaces.images\:actTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=5, height=26, baseColorParam=generalBackgroundColor,
gradientColorParam=tabBackgroundColor}
+org.richfaces.images\:pmenu_bg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=5, height=26, baseColorParam=headerGradientColor,
gradientColorParam=headerBackgroundColor}
+
org.richfaces.images\:actLeftTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=26, height=5, baseColorParam=tabBackgroundColor,
gradientColorParam=generalBackgroundColor, horizontal=true}
org.richfaces.images\:actRightTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=26, height=5, baseColorParam=generalBackgroundColor,
gradientColorParam=tabBackgroundColor, horizontal=true}
-org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
\ No newline at end of file
+org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
+
+org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevron
+
+org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronDown
+
+org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronLeft
+
+org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronUp
+
+org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconDisc
+
+org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconGrid
+
+org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconSpacer
+
+org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangle
+
+org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown
+
+org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleLeft
+
+org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp
\ No newline at end of file
Modified:
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java
===================================================================
---
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -33,7 +33,6 @@
* @author akolonitsky
* @since 2010-10-25
*/
-@Ignore
public class PanelMenuGroupRendererTest extends RendererTestBase {
@Test
@@ -46,6 +45,11 @@
doTest("panelMenuGroup-expanded", "f:panelMenuGroup");
}
+ @Test
+ public void testTopGroup() throws IOException, SAXException {
+ doTest("panelMenuGroup-topGroup", "f:panelMenuGroup");
+ }
+
}
Modified:
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java
===================================================================
---
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java 2010-11-29
10:02:29 UTC (rev 20205)
@@ -29,11 +29,10 @@
import org.junit.Test;
import org.xml.sax.SAXException;
- /**
+/**
* @author akolonitsky
* @since 2010-10-25
*/
-@Ignore
public class PanelMenuItemRendererTest extends RendererTestBase {
@Test
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2010-11-29
10:02:29 UTC (rev 20205)
@@ -1,12 +1,20 @@
<div id="f:panelMenuGroup" class="rf-pm-gr">
<input id="f:panelMenuGroup:expanded"
name="f:panelMenuGroup:expanded" type="hidden"
value="true"/>
<div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
- Group Label
+ <table class="rf-pm-gr-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-gr-ico rf-pm-grid"></td>
+ <td class="rf-pm-gr-lbl">Group Label</td>
+ <td class="rf-pm-gr-exp-ico
rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
</div>
<div id="f:panelMenuGroup:cnt" class="rf-pm-gr-cnt
rf-pm-exp">
+ <script type="text/javascript">
+ // Text
+ </script>
</div>
- <script type="text/javascript">
- // Text
- </script>
-</div>
+</div>
\ No newline at end of file
Added:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml
(rev 0)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,49 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright ${year}, Red Hat, Inc. and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+-->
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:pn="http://richfaces.org/output"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <h:head>
+ <title>Richfaces PanelMenuGroup Test</title>
+ </h:head>
+
+<h:body>
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:panelMenu>
+ <pn:panelMenuGroup id="panelMenuGroup" expanded="true"
label="Group Label">
+ <!-- TODO -->
+ </pn:panelMenuGroup>
+ </pn:panelMenu>
+ </h:form>
+</h:body>
+</html>
+
+
Added:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
(rev 0)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2010-11-29
10:02:29 UTC (rev 20205)
@@ -0,0 +1,20 @@
+<div id="f:panelMenuGroup" class="rf-pm-top-gr">
+ <input id="f:panelMenuGroup:expanded"
name="f:panelMenuGroup:expanded" type="hidden"
value="true"/>
+ <div id="f:panelMenuGroup:hdr" class="rf-pm-top-gr-hdr">
+ <table class="rf-pm-top-gr-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-top-gr-ico rf-pm-grid"></td>
+ <td class="rf-pm-top-gr-lbl">Group Label</td>
+ <td class="rf-pm-top-gr-exp-ico
rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="f:panelMenuGroup:cnt" class="rf-pm-top-gr-cnt
rf-pm-exp">
+ <script type="text/javascript">
+ // Text
+ </script>
+
+ </div>
+</div>
\ No newline at end of file
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2010-11-29
10:02:29 UTC (rev 20205)
@@ -1,12 +1,20 @@
<div id="f:panelMenuGroup" class="rf-pm-gr">
<input id="f:panelMenuGroup:expanded"
name="f:panelMenuGroup:expanded" type="hidden"
value="false"/>
<div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
- panelMenuGroup
+ <table class="rf-pm-gr-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-gr-ico rf-pm-grid"></td>
+ <td class="rf-pm-gr-lbl">panelMenuGroup</td>
+ <td class="rf-pm-gr-exp-ico
rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
</div>
<div id="f:panelMenuGroup:cnt" class="rf-pm-gr-cnt
rf-pm-colps">
+ <script type="text/javascript">
+ // Text
+ </script>
</div>
- <script type="text/javascript">
- // Text
- </script>
</div>
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2010-11-29
09:59:46 UTC (rev 20204)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2010-11-29
10:02:29 UTC (rev 20205)
@@ -1,5 +1,13 @@
<div id="f:panelMenuItem" class="rf-pm-itm">
- panelMenuItem
+ <table class="rf-pm-itm-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-itm-ico rf-pm-grid"></td>
+ <td class="rf-pm-itm-lbl">panelMenuItem</td>
+ <td class="rf-pm-itm-exp-ico
rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
<script type="text/javascript">
// Text