JBoss Rich Faces SVN: r767 - in trunk/richfaces/panelmenu/src/main: java/org/richfaces/component/panelmenu and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-15 13:08:48 -0400 (Tue, 15 May 2007)
New Revision: 767
Added:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconBasic.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java
trunk/richfaces/panelmenu/src/main/resources/org/
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Modified:
trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
Initial commit for panel menu component.
Modified: trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-15 17:08:48 UTC (rev 767)
@@ -63,51 +63,61 @@
<name>iconItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the enabled item state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
</property>
<property>
<name>iconDisabledItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconTopItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the enabled top item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconTopDisabledItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled top item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconExpandedGroup</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the expanded Group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconCollapsedGroup</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the collapsed Group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconDisabledGroup</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconExpandedTopGroup</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the expanded top group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconCollapsedTopGroup</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the collapsed top group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconTopDisableGroup</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled top Group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconItemPosition</name>
@@ -285,16 +295,19 @@
<name>iconExpanded</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the expanded item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconCollapsed</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the collapsed item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconDisabled</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>disabled</name>
@@ -408,11 +421,13 @@
<name>icon</name>
<classname>java.lang.String</classname>
<description>Path to the icon or the default one name to be displayed for the enabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconDisabled</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>disabled</name>
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -26,6 +26,10 @@
public abstract class UIPanelMenuGroup extends UISwitchablePanel {
public static final String COMPONENT_TYPE = "org.richfaces.panelMenuGroup";
+
+ public abstract String getStyleClass();
+
+ public abstract void setStyleClass(String styleClass);
public abstract String getMode();
public abstract void setMode(String mode);
@@ -43,8 +47,8 @@
public abstract void setAction(String action);
public abstract String getTarget();
public abstract void setTarget(String target);
- public abstract boolean isImmediate();
- public abstract void setImmediate(boolean immediate);
+ /*public abstract boolean isImmediate();
+ public abstract void setImmediate(boolean immediate);*/
public abstract String getHoverClass();
public abstract void setHoverClass(String hoverClass);
public abstract String getHoverStyle();
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -21,13 +21,93 @@
package org.richfaces.renderkit;
+import java.io.IOException;
+import java.util.Map;
+
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.framework.util.style.CSSFormat;
+import org.richfaces.component.panelmenu.UIPanelMenu;
+
public class PanelMenuGroupRenderer extends PanelMenuRendererBase {
protected Class getComponentClass() {
return UIComponent.class;
}
+ public void insertImage(FacesContext context, UIComponent component, Object data)
+ throws IOException {
+
+ String from = (String)data;
+ String align = "";
+
+ UIPanelMenu panelMenu = findMenu(component);
+ boolean isTopLevel = component.getParent() instanceof UIPanelMenu;
+
+ if (isTopLevel){
+ align = panelMenu.getIconItemTopPosition();
+ } else {
+ align = panelMenu.getIconItemPosition();
+ }
+
+ if (align.equalsIgnoreCase(from)) {
+ image(context, component, "");
+ } else{
+ image(context, component, "spacer");
+ }
+
+ }
+ private void image(FacesContext context, UIComponent component, String data)throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ UIPanelMenu panelMenu = findMenu(component);
+ if(panelMenu == null){
+ return;
+ }
+
+ boolean isTopLevel = component.getParent() instanceof UIPanelMenu;
+ boolean isOpened = isOpened(context,component).equals("opened") ? true : false;
+
+ String source = "";
+ String iconNode = "";
+
+ Object iconCollapsed = component.getAttributes().get("iconCollapsed");
+ Object iconExpanded = component.getAttributes().get("iconExpanded");
+
+ if (( isOpened ? iconExpanded : iconCollapsed ).equals("")){
+ source = getIconByType("custom", isTopLevel,context, component);
+ } else {
+ if (iconNode.equals("none")){
+ return;
+ } else {
+ source = getIconByType(data.equals("spacer")?"custom":iconCollapsed.toString(),isTopLevel,context,component);
+ }
+ }
+
+ int h = 16; //width(context);
+ writer.startElement("img", component);
+ writer.writeAttribute("src", source, null);
+ writer.writeAttribute("alt","",null);
+ writer.writeAttribute("vspace", "0", null);
+ writer.writeAttribute("hspace", "0", null);
+ writer.writeAttribute("style","display:block;",null);
+ writer.writeAttribute("width", String.valueOf(h), null);
+ writer.writeAttribute("height",String.valueOf(h), null);
+ writer.endElement("img");
+ }
+
+ public String isOpened(FacesContext context, UIComponent component)throws IOException {
+ String clientId = component.getClientId(context);
+ Map requestParameterMap = context.getExternalContext().getRequestParameterMap();
+ Object value = requestParameterMap.get("panelMenuState"+clientId);
+ if (value != null) {
+ if (value.equals("opened")) {
+ return "opened";
+ }
+ }
+ return "closed";
+ }
+
}
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -21,11 +21,92 @@
package org.richfaces.renderkit;
+import java.io.IOException;
+
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.framework.renderer.compiler.TemplateContext;
+import org.richfaces.component.panelmenu.UIPanelMenu;
+import org.richfaces.component.panelmenu.UIPanelMenuItem;
+
public class PanelMenuItemRenderer extends PanelMenuRendererBase {
protected Class getComponentClass() {
return UIComponent.class;
}
+ public String getOnClick(TemplateContext templateContext){
+ FacesContext context = templateContext.getFacesContext();
+ UIComponent component = templateContext.getComponent();
+ String clientId = component.getClientId(context);
+ return ";PanelMenuStorage['" + clientId + "'].trigger(event);";
+ }
+
+ public void insertImage(FacesContext context, UIComponent component, Object data) throws IOException {
+ String from = (String)data;
+ UIPanelMenu panelMenu = findMenu(component);
+ if(panelMenu == null){
+ return;
+ }
+ String align = "";
+ boolean isTopLevel = component.getParent() instanceof UIPanelMenu;
+
+ if (isTopLevel){
+ align = panelMenu.getIconItemTopPosition();
+ } else {
+ align = panelMenu.getIconItemPosition();
+ }
+
+ if (component.getChildCount()==0){
+ if (align.equalsIgnoreCase(from)){
+ image(context,component,"");
+ } else{
+ image(context,component,"spacer");
+ }
+ } else {
+ image(context,component,"spacer");
+ }
+ }
+
+ private void image(FacesContext context, UIComponent component, String align)
+ throws IOException{
+
+ UIPanelMenu panelMenu = findMenu(component);
+ ResponseWriter writer = context.getResponseWriter();
+ String iconItemTopLevel = panelMenu.getIconTopItem();
+ String iconItem = panelMenu.getIconItem();
+ boolean isTopLevel = component.getParent() instanceof UIPanelMenu;
+ String source = "";
+ String iconType = "";
+ Object customIcon = ((UIPanelMenuItem)component).getIcon();
+
+ if (customIcon.equals("")){
+ if (isTopLevel){
+ source = getIconByType(align.equals("spacer") ? "custom" : iconItemTopLevel, isTopLevel, context, component);
+ } else {
+ source = getIconByType(align.equals("spacer") ? "custom" : iconItem, isTopLevel, context, component);
+ }
+ } else {
+ if ((!isTopLevel&&iconItem.equals("none"))||(isTopLevel&&iconItemTopLevel.equals("none"))){
+ iconType = "none";
+ } else {
+ source = getIconByType(align.equals("spacer") ? "custom" : customIcon.toString(),isTopLevel,context,component);
+ }
+ }
+
+ if (!iconType.equals("none")){
+ int h = 16; //width(context);
+ writer.startElement("img",component);
+ writer.writeAttribute("src",source,null);
+ writer.writeAttribute("alt","",null);
+ writer.writeAttribute("vspace","0",null);
+ writer.writeAttribute("hspace","0",null);
+ writer.writeAttribute("style","display:block;",null);
+ writer.writeAttribute("width",String.valueOf(h),null);
+ writer.writeAttribute("height",String.valueOf(h),null);
+ writer.endElement("img");
+ }
+ }
+
}
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -21,8 +21,24 @@
package org.richfaces.renderkit;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.application.ViewHandler;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.richfaces.component.panelmenu.UIPanelMenu;
+import org.richfaces.component.panelmenu.UIPanelMenuGroup;
+import org.richfaces.component.panelmenu.UIPanelMenuItem;
+import org.richfaces.renderkit.iconImages.PanelMenuIconSpacer;
+
/**
* @author hans
*
@@ -36,4 +52,259 @@
return UIComponent.class;
}
+ public void insertScript(FacesContext context, UIComponent component)
+ throws IOException {
+
+ StringBuffer buffer = new StringBuffer();
+ StringBuffer panelMenu = new StringBuffer();
+ List flatList = new LinkedList();
+ Map levels = new HashMap();
+
+ Object singleOpen = component.getAttributes().get("singleOpen");
+
+ if (singleOpen!=null){
+ singleOpen = singleOpen.toString();
+ } else {
+ singleOpen = "false";
+ }
+
+ flatten(component.getChildren(), flatList, levels, 0);
+
+ panelMenu
+ .append("new PanelMenu('")
+ .append(component.getClientId(context).toString())
+ .append("',")
+ .append(singleOpen.toString())
+ .append(");\n");
+ String iconPosition = ((UIPanelMenu)component).getIconItemPosition();
+ String iconPositionTopLevel = ((UIPanelMenu)component).getIconItemTopPosition();
+ for (Iterator iter = flatList.iterator(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ if ((child instanceof UIPanelMenuItem)||(child instanceof UIPanelMenuGroup)) {
+ Object childDisabled = child.getAttributes().get("disabled");
+ boolean childRendered = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isRendered() : ((UIPanelMenuItem)child).isRendered();
+ boolean parentRendered = true;
+ if (! (child.getParent() instanceof UIPanelMenu))
+ parentRendered = child.getParent() instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child.getParent()).isRendered() : ((UIPanelMenuItem)child.getParent()).isRendered();
+ if (!parentRendered){
+ child.getAttributes().put("rendered",Boolean.FALSE);
+ }
+ String onopen = child instanceof UIPanelMenuGroup ?
+ findMenu(child).getOngroupexpand() : "";
+ String onclose = child instanceof UIPanelMenuGroup ?
+ findMenu(child).getOngroupcollapse() : "";
+
+
+ if (childRendered && parentRendered){
+ if (childDisabled==null || !childDisabled.equals("true")){
+ buffer
+ .append("new PanelMenuItem({myId:'")
+ .append((String) child.getClientId(context))
+ .append("',parentId:'")
+ .append((String) child.getParent().getClientId(context))
+ .append("'},{type:" + (child instanceof UIPanelMenuItem ? "\"item\"":"\"node\""))
+ .append(",onopen:"+(onopen.equals("") ? "\"\"" : "\"" + onopen + "\"")+",onclose:"+(onclose.equals("") ? "\"\"" : "\"" + onclose + "\""))
+ .append("}," + levels.get(child.getClientId(context)));
+
+ switchOnImagesIfNeeded(context,child,buffer);
+
+ addActionIfNeeded(context,child,buffer);
+
+ setExpandedIfNeeded(context,child,buffer);
+
+ String iconPos = child.getParent() instanceof UIPanelMenu ? iconPositionTopLevel.toLowerCase() : iconPosition.toLowerCase() ;
+
+ buffer.append(","+'"'+iconPos+'"');
+
+ addImages(buffer,context,child,component.getClientId(context).toString());
+
+ buffer.append("\n");
+ }
+ } else {
+ continue;
+ }
+ }
+ }
+ StringBuffer ret = new StringBuffer();
+ ret.append("<script ");
+ ret.append("type=\"text/javascript\"");
+ ret.append("id =\"script" + component.getClientId(context)+"\">\n");
+ ret.append(panelMenu);
+ ret.append(buffer);
+ ret.append("\n</script>");
+
+ ResponseWriter writer = context.getResponseWriter();
+ writer.write(ret.toString());
+ }
+
+ public void flatten(List children, List flatList, Map levels,int initialLevel) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (children != null) {
+ for (Iterator iter = children.iterator(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ if (child instanceof UIPanelMenu){
+ continue;
+ }
+ flatList.add(child);
+ levels.put(child.getClientId(context), new Integer(initialLevel));
+ flatten(child.getChildren(), flatList, levels, initialLevel + 1);
+ }
+ }
+ }
+
+ private void switchOnImagesIfNeeded(FacesContext context, UIComponent child, StringBuffer buffer)throws IOException {
+ boolean isToplevel = child.getParent() instanceof UIPanelMenu;
+ String customIconOpened = "";
+ String customIconClosed = "";
+
+ UIPanelMenu panelMenu = findMenu(child);
+ if(panelMenu == null){
+ return;
+ }
+ String iconOpened = isToplevel ? panelMenu.getIconExpandedTopGroup() : panelMenu.getIconExpandedGroup();
+ String iconClosed = isToplevel ? panelMenu.getIconCollapsedTopGroup() : panelMenu.getIconCollapsedGroup();
+
+ try {
+ customIconOpened = (String)child.getAttributes().get("iconOpened");
+ customIconClosed = (String)child.getAttributes().get("iconClosed");
+ } catch (Exception e) {}
+
+ if (child instanceof UIPanelMenuItem){
+ buffer.append(",false");
+ } else {
+ if (iconClosed.equals("custom")&&iconOpened.equals("custom")){
+ if (customIconClosed.equals("")&&customIconOpened.equals("")){
+ buffer.append(",false");
+ } else {
+ buffer.append(",true");
+ }
+ } else {
+ buffer.append(",true");
+ }
+ }
+ }
+
+ private void addActionIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
+ if (child instanceof UIPanelMenuItem){
+ if (child.getChildCount()>0){
+ buffer.append(",'panelMenuItemAction'");
+ } else {
+ ViewHandler viewHandler = context.getApplication().getViewHandler();
+ String viewId = context.getViewRoot().getViewId();
+ String actionUrl = context.getExternalContext().encodeActionURL(viewHandler.getActionURL(context, viewId));
+ buffer.append(",'"+actionUrl+"'");
+ }
+ } else {
+ if (((UIPanelMenuGroup)child).getAction()!=null&&!((UIPanelMenuGroup)child).getAction().equals("")){
+ buffer.append(",'panelMenuNodeAction'");
+ } else {
+ buffer.append(",false");
+ }
+ }
+ }
+
+ private void setExpandedIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
+ String value = "";
+ try {
+ value = context.getExternalContext().getRequestParameterMap().get("panelMenuState"+child.getClientId(context)).toString();
+ } catch (Exception e) {
+ value = "";
+ }
+ if (!value.equals("")){
+ if (value.equals("opened")) {
+ buffer.append(",true");
+ } else {
+ buffer.append(",false");
+ }
+ } else {
+ Object property = child.getAttributes().get("expanded");
+ if (property!=null&&property.equals("true")){
+ buffer.append(",true");
+ } else {
+ buffer.append(",false");
+ }
+ }
+ }
+
+ private void addImages(StringBuffer buffer,FacesContext context,UIComponent component,String id){
+ UIPanelMenu panelMenu = findMenu(component);
+ if(panelMenu == null){
+ return;
+ }
+
+ final String PANEL_MENU_SPACER_ICON = InternetResourceBuilder.getInstance().createResource(null,PanelMenuIconSpacer.class.getName()).getUri(context, null);;
+ boolean isTopLevel = component.getParent() instanceof UIPanelMenu;
+
+ String iconItem = isTopLevel ? panelMenu.getIconTopItem() : panelMenu.getIconItem();
+ String iconNodeClosed = isTopLevel ? panelMenu.getIconCollapsedTopGroup() : panelMenu.getIconCollapsedGroup();
+ String iconNodeOpened = isTopLevel ? panelMenu.getIconExpandedTopGroup() : panelMenu.getIconExpandedGroup();
+
+ String sourceIconItem = getIconByType(iconItem, isTopLevel,context, component);
+ String sourceIconNodeClosed = getIconByType(iconNodeClosed, isTopLevel,context, component);
+ String sourceIconNodeOpened = getIconByType(iconNodeOpened, isTopLevel,context, component);
+
+ String customIconOpened = "";
+ String customIconClosed = "";
+ String customIconOpenedSource = "";
+ String customIconClosedSource = "";
+ String customIcon = "";
+ String customIconSource = "";
+
+ if (component instanceof UIPanelMenuGroup){
+
+ customIconOpened = (String) component.getAttributes().get("iconOpened");
+ customIconClosed = (String) component.getAttributes().get("iconClosed");
+ customIconOpenedSource = getIconByType(customIconOpened,isTopLevel,context,component);
+ customIconClosedSource = getIconByType(customIconClosed,isTopLevel,context,component);
+
+ } else if (component instanceof UIPanelMenuItem){
+
+ customIcon = component.getAttributes().get("icon").toString();
+ customIconSource = getIconByType(customIcon,isTopLevel,context,component);
+
+ }
+
+ if (component instanceof UIPanelMenuGroup){
+ if (!iconNodeClosed.equals("")&&!iconNodeOpened.equals("")){
+ if (!iconNodeClosed.equals("custom")&&!iconNodeOpened.equals("custom")){
+ if(component.getAttributes().get("iconOpened").equals("")&&component.getAttributes().get("iconClosed").equals("")){
+ buffer.append(","+'"'+ (sourceIconNodeOpened.equals("")?customIconOpenedSource:sourceIconNodeOpened) + '"').append(","+'"'+(sourceIconNodeClosed.equals("")?customIconClosedSource:sourceIconNodeClosed)+'"'+");");
+ } else if(component.getAttributes().get("iconOpened").equals("")){
+ buffer.append(","+'"'+customIconClosedSource+'"').append(","+'"'+customIconClosedSource+'"'+");");
+ } else if (component.getAttributes().get("iconClosed").equals("")) {
+ buffer.append(","+'"'+customIconOpenedSource+'"').append(","+'"'+customIconOpenedSource+'"'+");");
+ } else {
+ buffer.append(","+'"'+customIconOpenedSource+'"').append(","+'"'+customIconClosedSource+'"'+");");
+ }
+ } else if (iconNodeClosed.equals("custom")){
+ buffer.append(",\"" + (customIconOpened.equals("")? sourceIconNodeOpened : customIconOpenedSource) + '"').append(",\"" + (customIconClosed.equals("")? PANEL_MENU_SPACER_ICON : customIconClosedSource)+"\");");
+ } else if (iconNodeOpened.equals("custom")){
+ buffer.append(",\"" + (customIconOpened.equals("")? PANEL_MENU_SPACER_ICON : customIconOpenedSource) + '"').append(",\"" + (customIconClosed.equals("")? sourceIconNodeClosed : customIconClosedSource)+"\");");
+ } else{
+ buffer.append(",\"" + (customIconOpened.equals("")? PANEL_MENU_SPACER_ICON : customIconOpenedSource) + '"').append(",\"" + (customIconClosed.equals("")? PANEL_MENU_SPACER_ICON : customIconClosedSource)+"\");");
+ }
+ } else {
+ buffer.append(");");
+ }
+ } else {
+ if (!iconItem.equals("")){
+ if (!iconItem.equals("custom")){
+ if(component.getAttributes().get("icon").equals("")){
+ buffer.append(","+'"'+sourceIconItem+'"').append(","+'"'+sourceIconItem+'"'+");");
+ } else {
+ buffer.append(","+'"'+customIconSource+'"').append(","+'"'+customIconSource+'"'+");");
+ }
+ } else {
+ if(component.getAttributes().get("icon").equals("")){
+ buffer.append(","+'"'+PANEL_MENU_SPACER_ICON+'"').append(","+'"'+PANEL_MENU_SPACER_ICON+'"'+");");
+ } else {
+ buffer.append(","+'"'+customIconSource+'"').append(","+'"'+customIconSource+'"'+");");
+ }
+ }
+ } else {
+ buffer.append(");");
+ }
+ }
+ }
+
}
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -21,12 +21,126 @@
package org.richfaces.renderkit;
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
+import org.ajax4jsf.framework.renderer.compiler.TemplateContext;
+import org.ajax4jsf.framework.skin.Skin;
+import org.richfaces.component.panelmenu.UIPanelMenu;
+import org.richfaces.renderkit.iconImages.PanelMenuIconArrow;
+import org.richfaces.renderkit.iconImages.PanelMenuIconArrowDown;
+import org.richfaces.renderkit.iconImages.PanelMenuIconArrowUp;
+import org.richfaces.renderkit.iconImages.PanelMenuIconDisc;
+import org.richfaces.renderkit.iconImages.PanelMenuIconDots;
+import org.richfaces.renderkit.iconImages.PanelMenuIconDoubleArrow;
+import org.richfaces.renderkit.iconImages.PanelMenuIconDoubleArrowDown;
+import org.richfaces.renderkit.iconImages.PanelMenuIconDoubleArrowUp;
+import org.richfaces.renderkit.iconImages.PanelMenuIconSpacer;
+import org.richfaces.renderkit.iconImages.PanelMenuIconSquare;
/**
* @author hans
*
*/
public abstract class PanelMenuRendererBase extends HeaderResourcesRendererBase {
-
+ public void insertTDs(FacesContext context , UIComponent component) throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ int level = calculateLevel(component);
+ StringBuffer buffer = new StringBuffer();
+ String src = getIconByType("custom",false,context,component);
+ int w = 16; //width(context);
+ for (int i=0;i<level;i++){
+ buffer.append("<td><img src=\"" + src + "\" alt=\"\" hspace=\"0\" vspace=\"0\" height=\""+w+"\" width=\""+w+"\" style=\"display:block;\"></td>\n");
+ }
+ writer.write(buffer.toString());
+ }
+
+ protected int calculateLevel (UIComponent component){
+ int level = 0;
+ UIComponent parent = component.getParent();
+ while(parent != null){
+ if(parent instanceof UIPanelMenu){
+ return level;
+ }
+ parent = parent.getParent();
+ level++;
+ }
+ return level;
+ }
+
+ /**
+ * If icon type is a pre-defined value, return corresponding image, otherwise
+ * otherwise
+ * @param iconType
+ * @param context
+ * @param component
+ * @return URI of requested image
+ */
+ protected String getIconByType(String iconType, boolean isTopLevel, FacesContext context,
+ UIComponent component){
+
+ String source = "";
+ String color = "";
+ Skin skin = getSkin(context);
+
+ if (isTopLevel){
+ color = (String) skin.getParameter(context,"panelmenu.headerBulletColor");
+ } else {
+ color = (String) skin.getParameter(context,"panelmenu.itemBulletColor");
+ }
+ if(iconType != null && !iconType.equals("none")){
+ if (iconType.equals("custom")){
+ source = getResource(PanelMenuIconSpacer.class.getName()).getUri(context, color);
+ } else if (iconType.equals("triangle")) {
+ source = getResource(PanelMenuIconArrow.class.getName()).getUri(context, color);
+ } else if (iconType.equals("triangleDown")) {
+ source = getResource(PanelMenuIconArrowDown.class.getName()).getUri(context, color);
+ } else if (iconType.equals("triangleUp")) {
+ source = getResource(PanelMenuIconArrowUp.class.getName()).getUri(context, color);
+ } else if (iconType.equals("chevron")) {
+ source = getResource(PanelMenuIconDoubleArrow.class.getName()).getUri(context, color);
+ } else if (iconType.equals("chevronUp")) {
+ source = getResource(PanelMenuIconDoubleArrowUp.class.getName()).getUri(context, color);
+ } else if (iconType.equals("chevronDown")) {
+ source = getResource(PanelMenuIconDoubleArrowDown.class.getName()).getUri(context, color);
+ } else if (iconType.equals("square")) {
+ source = getResource(PanelMenuIconSquare.class.getName()).getUri(context, color);
+ } else if (iconType.equals("disc")) {
+ source = getResource(PanelMenuIconDisc.class.getName()).getUri(context, color);
+ } else if (iconType.equals("grid")) {
+ source = getResource(PanelMenuIconDots.class.getName()).getUri(context, color);
+ } else {
+ source = (String)getUtils().encodeResourceURL(new TemplateContext(this,context,component),iconType);
+ }
+ }
+ return source;
+ }
+
+ protected UIPanelMenu findMenu (UIComponent component){
+ if (component instanceof UIPanelMenu) return (UIPanelMenu)component;
+ UIComponent parent = component;
+ while(parent != null){
+ if(parent instanceof UIPanelMenu){
+ return (UIPanelMenu) parent;
+ }
+ parent = parent.getParent();
+ }
+ return (UIPanelMenu) parent;
+ }
+
+ public String getHideStyle(FacesContext context, UIComponent component)
+ throws IOException {
+ return "";
+ }
+
+ public void insertValue(FacesContext context, UIComponent component) throws IOException {
+ Object value = component.getAttributes().get("value");
+ if (value!=null){
+ context.getResponseWriter().write(value.toString());
+ }
+ }
}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,61 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.iconImages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconArrow extends PanelMenuIconBasic {
+
+ public PanelMenuIconArrow() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ 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 = getDimensions(context);
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ g2d.translate(47,30);
+ path.moveTo(0,0);
+ path.lineTo(33,33);
+ path.lineTo(33,34);
+ path.lineTo(0,67);
+ path.closePath();
+ g2d.setColor((Color)(((Object[]) restoreData(context))[1]));
+ g2d.fill(path);
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,66 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.iconImages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconArrowDown extends PanelMenuIconBasic {
+
+ public PanelMenuIconArrowDown() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ 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 = getDimensions(context);
+
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ g2d.translate(31,54);
+
+ path.moveTo(0,0);
+ path.lineTo(33,33);
+ path.lineTo(34,33);
+ path.lineTo(67,0);
+ path.closePath();
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ g2d.fill(path);
+ }
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.iconImages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconArrowUp extends PanelMenuIconBasic {
+
+ public PanelMenuIconArrowUp() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ 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 = getDimensions(context);
+
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ g2d.translate(31,47);
+ path.moveTo(0,33);
+ path.lineTo(33,0);
+ path.lineTo(34,0);
+ path.lineTo(67,33);
+ path.closePath();
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ g2d.fill(path);
+ }
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconBasic.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconBasic.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconBasic.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,95 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.iconImages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.Java2Dresource;
+import org.ajax4jsf.framework.resource.ResourceContext;
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.HtmlColor;
+import org.ajax4jsf.framework.util.HtmlDimensions;
+
+
+/**
+ * @author Pavel Kotikov
+ *
+ */
+public class PanelMenuIconBasic extends Java2Dresource {
+
+ public PanelMenuIconBasic() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return calculateDimensions(getDataToStore(facesContext, data));
+ }
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return calculateDimensions(restoreData(resourceContext));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ }
+
+ protected Dimension calculateDimensions(Object data){
+ Object [] stored = (Object []) data;
+ int h = ((Integer) stored[0]).intValue();
+ return new Dimension(h,h);
+ }
+
+
+ /**
+ * @param data - pass icon color there
+ */
+ protected Object getDataToStore(FacesContext context, Object data) {
+ Object[] stored = new Object[5];
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+
+ stored[0] = new Integer(HtmlDimensions.decode("16px").intValue());
+
+ Color col = null;
+
+ if (data!=null){
+ col = HtmlColor.decode(data.toString());
+ } else {
+ col = HtmlColor.decode(skin.getParameter(context, "headerTextColor").toString());
+ }
+ stored[1]= col;
+ return stored;
+ }
+
+ public boolean isCacheable() {
+ return true;
+ }
+
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,59 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.iconImages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Ellipse2D;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconDisc extends PanelMenuIconBasic {
+
+ public PanelMenuIconDisc() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ Dimension dimension = getDimensions(context);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ int dim = (int) Math.round(dimension.getWidth() / 3);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(col);
+ g2d.translate(dim,dim);
+ Ellipse2D dot = new Ellipse2D.Double(0, 0, dim, dim);
+ g2d.fill(dot);
+
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,71 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.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.Rectangle2D;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconDots extends PanelMenuIconBasic {
+
+ public PanelMenuIconDots() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ 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 = getDimensions(context);
+ 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);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ 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);
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,90 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.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;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconDoubleArrow extends PanelMenuIconBasic {
+
+ public PanelMenuIconDoubleArrow() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D graphics2d) {
+
+ BufferedImage bufferedImage = new BufferedImage(128, 128, 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 = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ 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();
+ g2d.fill(path);
+
+ g2d.translate(24,0);
+
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage,transformOp, 0, 0);
+
+ g2d.dispose();
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,89 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.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;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconDoubleArrowDown extends PanelMenuIconBasic {
+
+ public PanelMenuIconDoubleArrowDown() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D graphics2D) {
+ BufferedImage bufferedImage = new BufferedImage(128, 128, 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 = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ 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();
+ g2d.fill(path);
+
+ g2d.translate(0,24);
+
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
+
+ g2d.dispose();
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,89 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.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;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconDoubleArrowUp extends PanelMenuIconBasic {
+
+ public PanelMenuIconDoubleArrowUp() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D graphics2D) {
+ BufferedImage bufferedImage = new BufferedImage(128, 128, 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 = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ 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();
+ g2d.fill(path);
+
+ g2d.translate(0,24);
+
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
+
+ g2d.dispose();
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.iconImages;
+
+import java.awt.Graphics2D;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconSpacer extends PanelMenuIconBasic {
+
+ public PanelMenuIconSpacer() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,70 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.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.GeneralPath;
+import java.util.Date;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconSquare extends PanelMenuIconBasic {
+
+ public PanelMenuIconSquare() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ 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);
+ GeneralPath path = new GeneralPath();
+ Dimension dimension = getDimensions(context);
+ g2d.setStroke(new BasicStroke(16,BasicStroke.CAP_SQUARE,BasicStroke.JOIN_BEVEL));
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+
+ g2d.translate(40,40);
+ path.moveTo(0,0);
+ path.lineTo(40,0);
+ path.lineTo(40,40);
+ path.lineTo(0,40);
+ path.closePath();
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ g2d.fill(path);
+ }
+}
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss (rev 0)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template
+ xmlns:f="http://jsf.exadel.com/template"
+ xmlns:u="http://jsf.exadel.com/template/util"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <f:verbatim>
+ .dr-pmenu-group {
+ height: 20px;
+ }
+
+ .dr-pmenu-item {
+ height: 20px;
+ }
+ </f:verbatim>
+
+ <u:selector name=".dr-pmenu-group">
+ <u:style name="width" value="100%"/>
+ <u:style name="padding" value="0px"/>
+ <u:style name="vertical-align" value="middle"/>
+ <u:style name="cursor" value="pointer"/>
+ <u:style name="text-align" value="left"/>
+ <u:style name="font-weight" skin="headerWeightFont"/>
+ <u:style name="font-family" skin="headerFamilyFont"/>
+ <u:style name="font-size" skin="headerSizeFont"/>
+ <u:style name="color" skin="headerTextColor"/>
+ <u:style name="border-style" value="none"/>
+ <u:style name="border-top-style" value="solid"/>
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background-color" skin="headerBackgroundColor"/>
+ </u:selector>
+
+ <u:selector name=".dr-pmenu-item">
+ <u:style name="width" value="100%"/>
+ <u:style name="padding" value="0px"/>
+ <u:style name="vertical-align" value="middle"/>
+ <u:style name="cursor" value="pointer"/>
+ <u:style name="text-align" value="left"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="font-weight" skin="generalWeightFont"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="color" skin="generalTextColor"/>
+ <u:style name="border-style" value="none"/>
+ <u:style name="border-top-style" value="solid"/>
+ <u:style name="border-color" skin="subBorderColor"/>
+ </u:selector>
+</f:template>
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js (rev 0)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-05-15 17:08:48 UTC (rev 767)
@@ -0,0 +1,255 @@
+if (!window.DW) {
+ window.DW = {};
+}
+
+if (!window.Richfaces) {
+ window.Richfaces = {};
+}
+
+var PanelMenuStorage = new Object();
+PanelMenu = Class.create();
+PanelMenu.prototype = {
+ initialize: function(myId,so){
+ this.childObj = new Array();
+ this.SingleOpen = so;
+ this.lastExpanded = null;
+ this.is = 'panelMenu';
+ PanelMenuStorage[myId] = this;}};
+PanelMenuItem = Class.create();
+PanelMenuItem.prototype = {
+ initialize: function(ids, options, level, haveDynamicIcon, action, opened, iconAlign, iconExpanded, iconCollapsed){
+ if (!ids.parentId){return};
+ this.type = options.type;
+ this.onopen = options.onopen;
+ this.onclose = options.onclose;
+ this.tdhider = $("tdhide"+ids.myId);
+ this.tablehider = $("tablehide"+ids.myId);
+ this.haveDynamicIcon = haveDynamicIcon;
+ if (this.haveDynamicIcon==true)
+ this.iconswitcher = $("icon"+ids.myId);
+ this.childObj = new Array();
+ this.parentObj = PanelMenuStorage[ids.parentId];
+ this.parentObj.childObj.push(this);
+ this.obj = $(ids.myId);
+ this.content = this._getDirectChildrenByTag(this.obj,"TD")[level+1];
+ this.iconAlign = iconAlign;
+ if (level == 0){
+ this.tdhider.style.display = "";
+ this.tablehider.style.display = "";
+ } else if (this._getDirectChildrenByTag(this.content,"INPUT")[0].value!="closed"){
+ this.tdhider.style.display = "";
+ this.tablehider.style.display = "";
+ }
+ this.iconCollapsed = iconCollapsed;
+ this.iconExpanded = iconExpanded;
+ if(action){
+ this.action = action;
+ }
+ PanelMenuStorage[ids.myId] = this;
+ this._attachBehaviors();
+ this.inputs = this._getDirectChildrenByTag(this.content,"INPUT");
+ for (var i=0;i<this.inputs.length;i++){
+ if (this.inputs[i].name.indexOf("panelMenuState")!=-1){
+ this.inputState = this.inputs[i];
+ } else if (this.inputs[i].name.indexOf("panelMenuAction")!=-1){
+ this.inputAction = this.inputs[i];
+ }
+ }
+ if (opened){
+ if (this.parentObj.is=='panelMenu')
+ this.parentObj.lastExpanded = this;
+ this.expand();
+ } else {
+ this.expanded = false;
+ }
+ if (this.parentObj.type=="node"&&this.parentObj.expanded){
+ if (this.type=="node")
+ this.tdhider.style.display="";
+ }
+ },
+
+ collapse: function(){
+ if (this.expanded){
+ if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
+ this._getDirectChildrenByTag(this.content,"INPUT")[0].value="closed";}
+ for (var i = 0; i < this.childObj.length; i++){
+ if (this.childObj[i]._getDirectChildrenByTag(this.childObj[i].content,"INPUT")[0]!=null){
+ this.childObj[i]._getDirectChildrenByTag(this.childObj[i].content,"INPUT")[0].value="";}
+ if (this.haveDynamicIcon){
+ var img = null
+ if (this.iconAlign=="right"){
+ img = this._getDirectChildrenByTag(this.iconswitcher.nextSibling,"IMG")[0];
+ } else {
+ img = this._getDirectChildrenByTag(this.iconswitcher.previousSibling,"IMG")[0];
+ }
+ if (img!=null){
+ if (this.iconCollapsed!="none"){
+ if (this.iconCollapsed!=null) {
+ img.src = this.iconCollapsed;
+ } else {
+ img.src = "images/panelMenuSpacer.png";
+ }
+ }
+ }
+ }
+ this.childObj[i].collapse();
+ this.childObj[i].hide();
+ this.childObj[i].tdhider.style.display="none";
+ this.childObj[i].tablehider.style.display="none";
+ }}
+ this.expanded = false;
+ },
+ hide: function(){
+ this.obj.style.display = 'none';
+ this.inputState.value="closed";
+ },
+ expand: function(){
+ if (!this.expanded){
+ if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
+ this.inputState.value="opened";
+ }
+ if (this.haveDynamicIcon){
+ var img = null
+ if (this.iconAlign=="right"){
+ img = this._getDirectChildrenByTag(this.iconswitcher.nextSibling,"IMG")[0];
+ } else {
+ img = this._getDirectChildrenByTag(this.iconswitcher.previousSibling,"IMG")[0];
+ }
+ if (img!=null){
+ if (this.iconExpanded!="none"){
+ if (this.iconExpanded!=null) {
+ img.src = this.iconExpanded;
+ } else {
+ img.src = "images/panelMenuSpacer.png";}}}}
+ for (var i = 0; i < this.childObj.length; i++){
+ this.childObj[i].show();
+ }
+ }
+ this.expanded = true;
+ },
+ show: function(){
+ if (this.type!="node")
+ this.inputState.value="opened";
+ this.tdhider.style.display="";
+ this.tablehider.style.display="";
+ this.obj.style.display = "";
+ },
+
+ preTrigger:function(e){
+ this.inputAction.setAttribute('value', this.obj.id);
+ },
+ trigger:function(e){
+ if (this.action !="panelMenuItemAction"){
+ this.preTrigger(e);
+ var form = Event.findElement(e, "form");
+ if(!form || typeof(form) == 'undefined' || !form.tagName || form.tagName.toLowerCase() != 'form'){
+ form = document.createElement('form');
+ form.setAttribute('method', 'post');
+ form.setAttribute('enctype', 'application/x-www-form-urlencoded');
+ form.action = action;
+ document.body.appendChild(form);
+ }
+ form.submit();
+ }
+ },
+ itemClicked: function(e){
+ if(this.action){
+ if (this.action=='panelMenuNodeAction'){
+ if (this.expanded){
+ if (this.type="node"){
+ if (new Function(this.onclose+";return true;")()){
+ this.collapse();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ } else {
+ if (this.parentObj.is=='panelMenu'&&this.parentObj.SingleOpen){
+ if (this.parentObj.lastExpanded!=null){
+ this.parentObj.lastExpanded.collapse();
+ }
+ if (this.type="node"){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ this.parentObj.lastExpanded = this;
+ } else {
+ if (this.type="node"){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ }
+ }
+ }
+ } else {
+ if (this.expanded){
+ if (this.type="node"){
+ if (new Function(this.onopen+";return true;")()){
+ this.collapse();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ } else {
+ if (this.parentObj.is=='panelMenu'&&this.parentObj.SingleOpen){
+ if (this.parentObj.lastExpanded!=null){
+ this.parentObj.lastExpanded.collapse();
+ }
+ if (this.type="node"){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ this.parentObj.lastExpanded = this;
+ } else {
+ if (this.type="node"){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ }
+ }
+ }
+ },
+
+ _getDirectChildrenByTag: function(e, tagName) {
+ var allKids = e.childNodes;
+ var kids = new Array();
+ var ddk;
+ tagName = tagName.toLowerCase();
+ for( var i = 0 ; i < allKids.length ; i++ )
+ if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
+ kids.push(allKids[i]);
+ return kids;
+ },
+
+ _fireEditEvent: function(e){
+ if( document.createEvent ) {
+ var evObj = document.createEvent('HTMLEvents');
+ evObj.initEvent( e, true, false );
+ this.edit.dispatchEvent(evObj);
+ } else if( document.createEventObject ) {
+ this.edit.fireEvent('on' + e);
+ }
+ },
+
+ _attachBehaviors: function() {
+ this.obj.onclick = this.itemClicked.bindAsEventListener(this);
+ }
+};
\ No newline at end of file
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-05-15 17:08:48 UTC (rev 767)
@@ -1,13 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<f:root
- xmlns:f="http:/jsf.exadel.com/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.renderkit.html.HtmlPanelMenuRenderer"
- baseclass="org.richfaces.renderkit.PanelMenuRenderer"
- component="org.richfaces.component.panelmenu.UIPanelMenu"
- >
+ xmlns:f="http:/jsf.exadel.com/template"
+ xmlns:h=" http://ajax4jsf.org/cdk/headers"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.HtmlPanelMenuRenderer"
+ baseclass="org.richfaces.renderkit.PanelMenuRenderer"
+ component="org.richfaces.component.panelmenu.UIPanelMenu" >
+
+ <h:styles>
+ /org/richfaces/renderkit/html/css/panelMenu.xcss
+ </h:styles>
+ <h:scripts>
+ new org.ajax4jsf.framework.resource.PrototypeScript(),
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/panelMenu.js,
+ </h:scripts>
+ <f:clientid var="clientId"/>
+
+ <f:call name="utils.encodeBeginFormIfNessesary"/>
+ <table cellpadding="0" cellspacing="0"
+ style="#{component.style};" class="#{component.styleClass}"
+ id="#{clientId}" >
+
+ <tbody>
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ <tr style="display:none">
+ <td>
+ <f:clientid var="clientId"/>
+ <f:call name="insertScript"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <f:call name="utils.encodeEndFormIfNessesary"/>
</f:root>
\ No newline at end of file
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-15 17:08:48 UTC (rev 767)
@@ -5,10 +5,49 @@
xmlns:ui=" http://ajax4jsf.org/cdk/ui"
xmlns:u=" http://ajax4jsf.org/cdk/u"
xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:vcp=" http://ajax4jsf.org/cdk/vcp"
class="org.richfaces.renderkit.html.HtmlPanelMenuGroupRenderer"
baseclass="org.richfaces.renderkit.PanelMenuGroupRenderer"
component="org.richfaces.component.panelmenu.UIPanelMenuGroup"
>
-
+ <f:clientid var="clientId"/>
+ <tr id="tdhide#{clientId}" style="#{hideStyle}" >
+ <td>
+ <table cellpadding="0" cellspacing="0" border="0" width="100%"
+ id="tablehide#{clientId}"
+ class="rich-pmenu-group dr-pmenu-group #{component.styleClass}"
+ style="#{component.style}" >
+ <f:call name="utils.encodePassThru" />
+ <tr>
+ <f:call name="utils.encodeId" />
+ <f:call name="insertTDs" />
+ <td>
+ <f:call name="insertImage">
+ <f:parameter value="left" />
+ </f:call>
+ </td>
+ <td style="width:100%" class="item_content"
+ id="icon#{clientId}" >
+ <input type="hidden" name="panelMenuState#{clientId}"
+ value="#{isOpened}" >
+ </input>
+ <input type="hidden" name="panelMenuAction#{clientId}"
+ value="" >
+ </input>
+ <f:call name="insertValue"/>
+
+ </td>
+ <td>
+ <f:call name="insertImage">
+ <f:parameter value="right" />
+ </f:call>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
</f:root>
\ No newline at end of file
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-15 14:17:36 UTC (rev 766)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-15 17:08:48 UTC (rev 767)
@@ -5,9 +5,50 @@
xmlns:ui=" http://ajax4jsf.org/cdk/ui"
xmlns:u=" http://ajax4jsf.org/cdk/u"
xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:vcp=" http://ajax4jsf.org/cdk/vcp"
class="org.richfaces.renderkit.html.HtmlPanelMenuItemRenderer"
baseclass="org.richfaces.renderkit.PanelMenuItemRenderer"
component="org.richfaces.component.panelmenu.UIPanelMenuItem"
>
-
+
+ <f:clientid var="clientId"/>
+ <tr id="tdhide#{clientId}" style="hideStyle" >
+ <td>
+ <table cellpadding="0" cellspacing="0" border="0" width="100%"
+ onclick="#{onClick}"
+ class="rich-pmenu-item dr-pmenu-item #{component.styleClass}"
+ style="#{component.style}"
+ id="tablehide#{clientId}" >
+ <f:call name="utils.encodePassThruWithExclusions">
+ <f:parameter value="onclick"/>
+ </f:call>
+ <tr>
+ <f:call name="utils.encodeId"/>
+ <f:call name="insertTDs"/>
+ <td>
+ <f:call name="insertImage">
+ <f:parameter value="left"/>
+ </f:call>
+ </td>
+ <td style="width:100%" class="item_content">
+ <input type="hidden" name="panelMenuState#{clientId}"
+ value="#{isOpened}" >
+ </input>
+ <input type="hidden" name="panelMenuActionn#{clientId}"
+ value="" >
+ </input>
+ <f:call name="insertValue"/>
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ </td>
+ <td>
+ <f:call name="insertImage">
+ <f:parameter value="right"/>
+ </f:call>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
</f:root>
\ No newline at end of file
17 years, 8 months
JBoss Rich Faces SVN: r766 - trunk/richfaces/modal-panel/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-05-15 10:17:36 -0400 (Tue, 15 May 2007)
New Revision: 766
Modified:
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-181 fixed
Modified: trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-05-15 13:42:18 UTC (rev 765)
+++ trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-05-15 14:17:36 UTC (rev 766)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<f:template
- xmlns:f="http:/jsf.exadel.com/template"
- xmlns:c=" http://java.sun.com/jsf/core"
+<f:template
+ xmlns:f="http:/jsf.exadel.com/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
xmlns:ui=" http://ajax4jsf.org/cdk/ui"
xmlns:u=" http://ajax4jsf.org/cdk/u"
xmlns:x=" http://ajax4jsf.org/cdk/x"
@@ -9,9 +9,9 @@
xmlns:vcp=" http://ajax4jsf.org/cdk/vcp"
class="org.richfaces.renderkit.html.ModalPanelRenderer"
baseclass="org.richfaces.renderkit.ModalPanelRendererBase"
- component="org.richfaces.component.UIModalPanel"
+ component="org.richfaces.component.UIModalPanel"
>
-
+
<h:styles>
/org/richfaces/renderkit/html/css/modalPanel.xcss
</h:styles>
@@ -19,43 +19,43 @@
new org.ajax4jsf.framework.resource.PrototypeScript(),
/org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/modalPanel.js,
- /org/richfaces/renderkit/html/scripts/modalPanelBorders.js,
+ /org/richfaces/renderkit/html/scripts/modalPanelBorders.js,
/org/richfaces/renderkit/html/scripts/browser_info.js
</h:scripts>
-
+
<f:clientid var="clientId"/>
-
+
<div id="#{clientId}"
style="display: none;"
>
-
+
<f:call name="checkOptions" />
-
+
<div id="#{clientId}Container"
style="position: absolute; display: none; z-index: #{component.zindex};"
class="rich-modalpanel"
x:passThruWithExclusions="id,style,class"
>
- <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}Div"
+ <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}Div"
style="z-index: 1;"></div>
- <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}CursorDiv"
+ <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}CursorDiv"
style="filter: alpha(opacity=1); opacity: 0.01; z-index: -200"></div>
-
+
<div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel" style="width: 1px; height: 1px; z-index: 2;">
-
+
<jsp:scriptlet>
<![CDATA[
if (component.isResizeable()) {
for (int i = 0; i < RESIZERS.length; i++) {
- variables.setVariable("resizer", RESIZERS[i]);
-
+ variables.setVariable("resizer", RESIZERS[i]);
+
boolean isHor = i / 3 % 2 == 0;
String style = isHor ? "width: 40px; height: 4px;" : "height: 40px; width: 4px;";
-
+
//higher z-index for corner elements
style += "z-index: " + (i % 3 == 1 ? 0 : 1) + 3 + ";";
variables.setVariable("resizerStyle", style);
- ]]>
+ ]]>
</jsp:scriptlet>
<div id="#{clientId}Resizer#{resizer}" class="dr-mpnl-resizer rich-mpnl-resizer" style="#{resizerStyle}">
</div>
@@ -63,26 +63,25 @@
<![CDATA[
}
}
- ]]>
+ ]]>
</jsp:scriptlet>
-
- <div id="#{clientId}ShadowDiv" class="dr-mpnl-shadow rich-mpnl-shadow"
- style="#{component.shadowStyle}" >
- </div>
-
+
+ <div id="#{clientId}ShadowDiv" class="dr-mpnl-shadow rich-mpnl-shadow"
+ style="#{component.shadowStyle}" >
+ </div>
+
<div style="position: absolute; overflow: hidden; z-index: 2;"
class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
<table style="height: 100%; width: 100%;" border="0" cellpadding="0" cellspacing="0">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("header")!=null && component.getFacet("header").isRendered()) {]]>
</jsp:scriptlet>
- <tr style="height: 1%;">
+ <tr style="height: 1%;">
<td class="dr-mpnl-header rich-mpnl-header-cell" style="position: relative; vertical-align: middle; z-index: 5;" width="100%">
- <div id="#{clientId}Header" style="position: relative;" class="dr-mpnl-pnl-text dr-mpnl-pnl-h rich-mpnl-text rich-mpnl-header #{component.attributes['headerClass']}"
- nowrap="nowrap">
+ <div id="#{clientId}Header" style="position: relative; white-space: nowrap;" class="dr-mpnl-pnl-text dr-mpnl-pnl-h rich-mpnl-text rich-mpnl-header #{component.attributes['headerClass']}">
<u:insertFacet name="header" />
</div>
-
+
<jsp:scriptlet>
<![CDATA[if(component.getFacet("controls")!=null && component.getFacet("controls").isRendered()) {]]>
</jsp:scriptlet>
@@ -107,28 +106,28 @@
</table>
</div>
</div>
-
+
<f:clientid var="clientId"/>
-
+
<script type="text/javascript">
- new ModalPanel('#{clientId}',
+ new ModalPanel('#{clientId}',
{
width: #{component.width},
height: #{component.height},
-
+
minWidth: #{component.minWidth},
minHeight: #{component.minHeight},
-
+
resizeable: #{component.resizeable},
moveable: #{component.moveable},
-
+
left: "#{component.left}",
top: "#{component.top}",
-
+
zindex: #{component.zindex}
});
</script>
</div>
</div>
-
+
</f:template>
\ No newline at end of file
17 years, 8 months
JBoss Rich Faces SVN: r765 - trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-15 09:42:18 -0400 (Tue, 15 May 2007)
New Revision: 765
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java
Log:
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java 2007-05-15 13:38:32 UTC (rev 764)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java 2007-05-15 13:42:18 UTC (rev 765)
@@ -2,7 +2,87 @@
import org.richfaces.component.UISwitchablePanel;
-public class UIPanelMenu extends UISwitchablePanel{
+public abstract class UIPanelMenu extends UISwitchablePanel{
+
public static final String COMPONENT_TYPE = "org.richfaces.panelMenu";
+ public abstract String getEvent();
+ public abstract void setEvent(String event);
+ public abstract String getMode();
+ public abstract void setMode(String mode);
+ public abstract String getWidth();
+ public abstract void setWidth(String width);
+ public abstract String getExpandMode();
+ public abstract void setExpandMode(String expandMode);
+ public abstract boolean isExpandSingle();
+ public abstract void setExpandSingle(boolean expandSingle);
+ public abstract String getIconItem();
+ public abstract void setIconItem(String iconItem);
+ public abstract String getIconDisabledItem();
+ public abstract void setIconDisabledItem(String iconDisabledItem);
+ public abstract String getIconTopItem();
+ public abstract void setIconTopItem(String iconTopItem);
+ public abstract String getIconTopDisabledItem();
+ public abstract void setIconTopDisabledItem(String iconTopDisabledItem);
+ public abstract String getIconExpandedGroup();
+ public abstract void setIconExpandedGroup(String iconExpandedGroup);
+ public abstract String getIconCollapsedGroup();
+ public abstract void setIconCollapsedGroup(String iconCollapsedGroup);
+ public abstract String getIconDisabledGroup();
+ public abstract void setIconDisabledGroup(String iconDisabledGroup);
+ public abstract String getIconExpandedTopGroup();
+ public abstract void setIconExpandedTopGroup(String iconExpandedTopGroup);
+ public abstract String getIconCollapsedTopGroup();
+ public abstract void setIconCollapsedTopGroup(String iconCollapsedTopGroup);
+ public abstract String getIconTopDisableGroup();
+ public abstract void setIconTopDisableGroup(String iconTopDisableGroup);
+ public abstract String getIconItemPosition();
+ public abstract void setIconItemPosition(String iconItemPosition);
+ public abstract String getIconItemTopPosition();
+ public abstract void setIconItemTopPosition(String iconItemTopPosition);
+ public abstract String getIconGroupPosition();
+ public abstract void setIconGroupPosition(String iconGroupPosition);
+ public abstract String getIconGroupTopPosition();
+ public abstract void setIconGroupTopPosition(String iconGroupTopPosition);
+ public abstract String getStyle();
+ public abstract void setStyle(String style);
+ public abstract String getStyleClass();
+ public abstract void setStyleClass(String styleClass);
+ public abstract String getGroupStyle();
+ public abstract void setGroupStyle(String groupStyle);
+ public abstract String getGroupClass();
+ public abstract void setGroupClass(String groupClass);
+ public abstract String getTopGroupStyle();
+ public abstract void setTopGroupStyle(String topGroupStyle);
+ public abstract String getTopGroupClass();
+ public abstract void setTopGroupClass(String topGroupClass);
+ public abstract String getItemStyle();
+ public abstract void setItemStyle(String itemStyle);
+ public abstract String getItemClass();
+ public abstract void setItemClass(String itemClass);
+ public abstract String getTopItemStyle();
+ public abstract void setTopItemStyle(String topItemStyle);
+ public abstract String getTopItemClass();
+ public abstract void setTopItemClass(String topItemClass);
+ public abstract String getDisabledItemClass();
+ public abstract void setDisabledItemClass(String disabledItemClass);
+ public abstract String getDisabledItemStyle();
+ public abstract void setDisabledItemStyle(String disabledItemStyle);
+ public abstract String getDisabledGroupClass();
+ public abstract void setDisabledGroupClass(String disabledGroupClass);
+ public abstract String getDisabledGroupStyle();
+ public abstract void setDisabledGroupStyle(String disabledGroupStyle);
+ public abstract String getHoveredItemClass();
+ public abstract void setHoveredItemClass(String hoveredItemClass);
+ public abstract String getHoveredItemStyle();
+ public abstract void setHoveredItemStyle(String hoveredItemStyle);
+ public abstract String getHoveredGroupClass();
+ public abstract void setHoveredGroupClass(String hoveredGroupClass);
+ public abstract String getOnitemhover();
+ public abstract void setOnitemhover(String onitemhover);
+ public abstract String getOngroupcollapse();
+ public abstract void setOngroupcollapse(String ongroupcollapse);
+ public abstract String getOngroupexpand();
+ public abstract void setOngroupexpand(String ongroupexpand);
+
}
17 years, 8 months
JBoss Rich Faces SVN: r764 - trunk/richfaces/panelmenu/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-15 09:38:32 -0400 (Tue, 15 May 2007)
New Revision: 764
Modified:
trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
Log:
Modified: trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-15 13:12:01 UTC (rev 763)
+++ trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-15 13:38:32 UTC (rev 764)
@@ -235,12 +235,6 @@
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- <property>
- <name>hoveredGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
&ui_component_attributes;
&html_events;
<property>
17 years, 8 months
JBoss Rich Faces SVN: r763 - trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-15 09:12:01 -0400 (Tue, 15 May 2007)
New Revision: 763
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java
Log:
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java 2007-05-15 12:53:12 UTC (rev 762)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java 2007-05-15 13:12:01 UTC (rev 763)
@@ -21,9 +21,44 @@
package org.richfaces.component.panelmenu;
-import javax.faces.component.UICommand;
+import org.richfaces.component.UISwitchablePanel;
-public class UIPanelMenuGroup extends UICommand {
+public abstract class UIPanelMenuGroup extends UISwitchablePanel {
+
public static final String COMPONENT_TYPE = "org.richfaces.panelMenuGroup";
+ public abstract String getMode();
+ public abstract void setMode(String mode);
+ public abstract String getIconExpanded();
+ public abstract void setIconExpanded(String iconExpanded);
+ public abstract String getIconCollapsed();
+ public abstract void setIconCollapsed(String iconCollapsed);
+ public abstract String getIconDisabled();
+ public abstract void setIconDisabled(String iconDisabled);
+ public abstract boolean isDisabled();
+ public abstract void setDisabled(boolean disabled);
+ public abstract Object getValue();
+ public abstract void setValue(Object value);
+ public abstract String getAction();
+ public abstract void setAction(String action);
+ public abstract String getTarget();
+ public abstract void setTarget(String target);
+ public abstract boolean isImmediate();
+ public abstract void setImmediate(boolean immediate);
+ public abstract String getHoverClass();
+ public abstract void setHoverClass(String hoverClass);
+ public abstract String getHoverStyle();
+ public abstract void setHoverStyle(String hoverStyle);
+ public abstract String getDisabledClass();
+ public abstract void setDisabledClass(String disabledClass);
+ public abstract String getDisabledStyle();
+ public abstract void setDisabledStyle(String disabledStyle);
+ public abstract String getStyle();
+ public abstract void setStyle(String style);
+ public abstract String getIconClass();
+ public abstract void setIconClass(String iconClass);
+ public abstract String getIconStyle();
+ public abstract void setIconStyle(String iconStyle);
+
+
}
17 years, 8 months
JBoss Rich Faces SVN: r762 - trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-15 08:53:12 -0400 (Tue, 15 May 2007)
New Revision: 762
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java
Log:
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java 2007-05-15 08:21:18 UTC (rev 761)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java 2007-05-15 12:53:12 UTC (rev 762)
@@ -23,7 +23,35 @@
import javax.faces.component.UICommand;
-public class UIPanelMenuItem extends UICommand {
+public abstract class UIPanelMenuItem extends UICommand {
+
public static final String COMPONENT_TYPE = "org.richfaces.panelMenuItem";
+
+ public abstract String getMode();
+ public abstract void setMode(String mode);
+ public abstract String getIcon();
+ public abstract void setIcon(String icon);
+ public abstract String getIconDisabled();
+ public abstract void setIconDisabled(String iconDisabled);
+ public abstract boolean isDisabled();
+ public abstract void setDisabled(boolean disabled);
+ public abstract Object getValue();
+ public abstract void setValue(Object value);
+ public abstract String getHoverClass();
+ public abstract void setHoverClass(String hoverClass);
+ public abstract String getHoverStyle();
+ public abstract void setHoverStyle(String hoverStyle);
+ public abstract String getDisabledClass();
+ public abstract void setDisabledClass(String disabledClass);
+ public abstract String getDisabledStyle();
+ public abstract void setDisabledStyle(String disabledStyle);
+ public abstract String getStyleClass();
+ public abstract void setStyleClass(String styleClass);
+ public abstract String getStyle();
+ public abstract void setStyle(String style);
+ public abstract String getIconClass();
+ public abstract void setIconClass(String iconClass);
+ public abstract String getIconStyle();
+ public abstract void setIconStyle(String iconStyle);
}
17 years, 8 months
JBoss Rich Faces SVN: r761 - in trunk/richfaces/panelmenu/src/main: java/org/richfaces and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-15 04:21:18 -0400 (Tue, 15 May 2007)
New Revision: 761
Added:
trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
trunk/richfaces/panelmenu/src/main/templates/org/
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
Initial commit for panel menu component.
Added: trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml (rev 0)
+++ trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,489 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.PanelMenu</name>
+ <family>org.richfaces.PanelMenu</family>
+ <description>Defines the menu on the page and the set of the child elements properties in layout.</description>
+ <superclass>org.richfaces.component.panelmenu.UIPanelMenu</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenu</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuRenderer</name>
+ <template>org/richfaces/htmlPanelMenu.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenu</name>
+ <classname>org.richfaces.taglib.PanelMenuTag</classname>
+ <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>event</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines the event on the representation element that
+ triggers the submenu's expand/collapse. (default=onclick)
+ </description>
+ <defaultvalue><![CDATA["onclick"]]></defaultvalue>
+ </property>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu items on the panel
+ menu except ones where this attribute redefined. (ajax, server,(Default), none)
+ </description>
+ <defaultvalue><![CDATA["server"]]></defaultvalue>
+ </property>
+ <property>
+ <name>width</name>
+ <classname>java.lang.String</classname>
+ <description>Set minimal width for the menu.</description>
+ <defaultvalue><![CDATA["100%"]]></defaultvalue>
+ </property>
+ <property>
+ <name>expandMode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu groups after
+ expand/collapse except ones where this attribute redefined. (ajax, server, none(Default))
+ </description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>expandSingle</name>
+ <classname>boolean</classname>
+ <description>
+ Whether only one panel menu node on top level can be opened at a time.
+ If the value of this attribute is true, the previously opened
+ node on the top level is closed. If the value is false, the node is left opened. The default value is false.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>iconItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the enabled item state</description>
+ </property>
+ <property>
+ <name>iconDisabledItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item state</description>
+ </property>
+ <property>
+ <name>iconTopItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the enabled top item state</description>
+ </property>
+ <property>
+ <name>iconTopDisabledItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled top item state</description>
+ </property>
+ <property>
+ <name>iconExpandedGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded Group state</description>
+ </property>
+ <property>
+ <name>iconCollapsedGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed Group state</description>
+ </property>
+ <property>
+ <name>iconDisabledGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled group state</description>
+ </property>
+ <property>
+ <name>iconExpandedTopGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded top group state</description>
+ </property>
+ <property>
+ <name>iconCollapsedTopGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed top group state</description>
+ </property>
+ <property>
+ <name>iconTopDisableGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled top Group state</description>
+ </property>
+ <property>
+ <name>iconItemPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the item icon</description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconItemTopPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the top item icon</description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconGroupPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the group icon</description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconGroupTopPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the top group icon</description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>The CSS style for the panel menu.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>The CSS class for the panel menu.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>groupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>groupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>itemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>itemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ &ui_component_attributes;
+ &html_events;
+ <property>
+ <name>onitemhover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ongroupcollapse</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ongroupexpand</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ </component>
+
+ <component>
+ <name>org.richfaces.PanelMenuGroup</name>
+ <family>org.richfaces.PanelMenuGroup</family>
+ <description>Defines expandable group of items inside the panel menu or other group.</description>
+ <superclass>org.richfaces.component.panelmenu.UIPanelMenuGroup</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenuGroup</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuGroupRenderer</name>
+ <template>org/richfaces/htmlPanelMenuGroup.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenuGroup</name>
+ <classname>org.richfaces.taglib.PanelMenuGroupTag</classname>
+ <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu groups after expand/collapse
+ except ones where this attribute redefined. (ajax, server, none(Default))
+ </description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpanded</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded item state</description>
+ </property>
+ <property>
+ <name>iconCollapsed</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed item state</description>
+ </property>
+ <property>
+ <name>iconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item state</description>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>Defines representation text for menuItem.</description>
+ </property>
+ &listeners;
+ <property>
+ <name>action</name>
+ <classname>java.lang.String</classname>
+ <description>The action method binding expression.</description>
+ </property>
+ <property>
+ <name>target</name>
+ <classname>java.lang.String</classname>
+ <description>Target frame for action to execute.</description>
+ </property>
+ <property>
+ <name>immediate</name>
+ <classname>boolean</classname>
+ <description>A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase.
+ </description>
+ </property>
+ &ui_component_attributes;
+ &html_input_attributes;
+ &html_input_events;
+ &ui_input_attributes;
+ &html_events;
+ <property>
+ <name>hoverClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) to be applied when this component is rendered.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to icon element.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ </component>
+
+ <component>
+ <name>org.richfaces.PanelMenuItem</name>
+ <family>org.richfaces.PanelMenuItem</family>
+ <description>Defines single Item inside popup list.</description>
+ <superclass>org.richfaces.component.panelmenu.UIPanelMenuItem</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenuItem</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuItemRenderer</name>
+ <template>org/richfaces/htmlPanelMenuItem.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenuItem</name>
+ <classname>org.richfaces.taglib.PanelMenuItemTag</classname>
+ <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode (ajax,server(Default),none)
+ </description>
+ <defaultvalue><![CDATA["server"]]></defaultvalue>
+ </property>
+ <property>
+ <name>icon</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon or the default one name to be displayed for the enabled item state</description>
+ </property>
+ <property>
+ <name>iconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item state</description>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>Defines representation text for menuItem.</description>
+ </property>
+ <property>
+ <name>hoverClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) to be applied when this component is rendered.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to icon element.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ &ui_component_attributes;
+ &ui_command_attributes;
+ &html_style_attributes;
+ &html_events;
+ </component>
+</components>
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,33 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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;
+
+import javax.faces.component.UIComponent;
+
+public class PanelMenuGroupRenderer extends PanelMenuRendererBase {
+ protected Class getComponentClass() {
+ return UIComponent.class;
+ }
+
+
+
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,31 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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;
+
+import javax.faces.component.UIComponent;
+
+public class PanelMenuItemRenderer extends PanelMenuRendererBase {
+ protected Class getComponentClass() {
+ return UIComponent.class;
+ }
+
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author hans
+ *
+ */
+public class PanelMenuRenderer extends PanelMenuRendererBase {
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+ */
+ protected Class getComponentClass() {
+ return UIComponent.class;
+ }
+
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,32 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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;
+
+import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
+
+/**
+ * @author hans
+ *
+ */
+public abstract class PanelMenuRendererBase extends HeaderResourcesRendererBase {
+
+}
Added: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx (rev 0)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http:/jsf.exadel.com/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ class="org.richfaces.renderkit.html.HtmlPanelMenuRenderer"
+ baseclass="org.richfaces.renderkit.PanelMenuRenderer"
+ component="org.richfaces.component.panelmenu.UIPanelMenu"
+ >
+
+</f:root>
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx (rev 0)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ class="org.richfaces.renderkit.html.HtmlPanelMenuGroupRenderer"
+ baseclass="org.richfaces.renderkit.PanelMenuGroupRenderer"
+ component="org.richfaces.component.panelmenu.UIPanelMenuGroup"
+ >
+
+
+</f:root>
\ No newline at end of file
Added: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx (rev 0)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-15 08:21:18 UTC (rev 761)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ class="org.richfaces.renderkit.html.HtmlPanelMenuItemRenderer"
+ baseclass="org.richfaces.renderkit.PanelMenuItemRenderer"
+ component="org.richfaces.component.panelmenu.UIPanelMenuItem"
+ >
+
+</f:root>
\ No newline at end of file
17 years, 8 months
JBoss Rich Faces SVN: r760 - trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-15 04:08:31 -0400 (Tue, 15 May 2007)
New Revision: 760
Added:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java
Log:
Initial commit for panel menu component.
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java 2007-05-14 23:59:24 UTC (rev 759)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java 2007-05-15 08:08:31 UTC (rev 760)
@@ -3,5 +3,6 @@
import org.richfaces.component.UISwitchablePanel;
public class UIPanelMenu extends UISwitchablePanel{
+ public static final String COMPONENT_TYPE = "org.richfaces.panelMenu";
}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuGroup.java 2007-05-15 08:08:31 UTC (rev 760)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.component.panelmenu;
+
+import javax.faces.component.UICommand;
+
+public class UIPanelMenuGroup extends UICommand {
+ public static final String COMPONENT_TYPE = "org.richfaces.panelMenuGroup";
+
+}
Added: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java (rev 0)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenuItem.java 2007-05-15 08:08:31 UTC (rev 760)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.component.panelmenu;
+
+import javax.faces.component.UICommand;
+
+public class UIPanelMenuItem extends UICommand {
+ public static final String COMPONENT_TYPE = "org.richfaces.panelMenuItem";
+
+}
17 years, 8 months
JBoss Rich Faces SVN: r759 - trunk/richfaces-samples/dataTableDemo.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-05-14 19:59:24 -0400 (Mon, 14 May 2007)
New Revision: 759
Modified:
trunk/richfaces-samples/dataTableDemo/
Log:
Property changes on: trunk/richfaces-samples/dataTableDemo
___________________________________________________________________
Name: svn:ignore
- target
.settings
.classpath
.project
.checkstyle
+ target
.settings
.classpath
.project
.checkstyle
.exadelproject
17 years, 8 months
JBoss Rich Faces SVN: r758 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: ccowens
Date: 2007-05-14 17:45:38 -0400 (Mon, 14 May 2007)
New Revision: 758
Modified:
trunk/docs/userguide/en/included/dragSupport.xml
trunk/docs/userguide/en/included/dropDownMenu.desc.xml
trunk/docs/userguide/en/included/dropDownMenu.xml
trunk/docs/userguide/en/included/menuItem.desc.xml
trunk/docs/userguide/en/included/menuItem.xml
trunk/docs/userguide/en/included/menuSeparator.desc.xml
trunk/docs/userguide/en/included/menuSeparator.xml
Log:
Modified: trunk/docs/userguide/en/included/dragSupport.xml
===================================================================
--- trunk/docs/userguide/en/included/dragSupport.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/dragSupport.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -71,7 +71,7 @@
</section>
<section>
- <title>Dynamical Creation from Java Code</title>
+ <title>Creating the Component Dynamically from Java</title>
<programlisting role="JAVA">import org.richfaces.component.html.HtmlDragSupport;
...
Modified: trunk/docs/userguide/en/included/dropDownMenu.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/dropDownMenu.desc.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/dropDownMenu.desc.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -1,33 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section>
- <sectioninfo>
- <keywordset>
- <keyword>dropDownMenu</keyword>
- </keywordset>
- </sectioninfo>
- <section>
-<title>Description</title>
- <para>The <rich:dropDownMenu> component is used for a multilevel dropdown menu creation.</para>
- <figure>
- <title><rich:dropDownMenu> component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/dropDownMenu1.png" />
- </imageobject>
- </mediaobject>
- </figure>
-</section>
-<section>
- <title>Key Features</title>
- <itemizedlist>
- <listitem><para>Highly customizable look and feel</para></listitem>
- <listitem><para>Popup appearance event customization</para></listitem>
- <listitem><para>Different submission modes</para></listitem>
- <listitem><para>Possibility of complex representation elements definition</para></listitem>
- <listitem><para>Disablement support</para></listitem>
- <listitem><para>Smart and user defined positioning </para></listitem>
- </itemizedlist>
-
-</section>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>dropDownMenu</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <section>
+ <title>Description</title>
+
+ <para>The <rich:dropDownMenu> component is used for creating
+ multilevel drop-down menus.</para>
+
+ <figure>
+ <title><rich:dropDownMenu> component</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropDownMenu1.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Key Features</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Highly customizable look-and-feel</para>
+ </listitem>
+
+ <listitem>
+ <para>Pop-up appearance event customization</para>
+ </listitem>
+
+ <listitem>
+ <para>Different submission modes</para>
+ </listitem>
+
+ <listitem>
+ <para>Ability to define a complex representation for elements</para>
+ </listitem>
+
+ <listitem>
+ <para>Support for disabling</para>
+ </listitem>
+
+ <listitem>
+ <para>Smart user-defined positioning</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
\ No newline at end of file
Modified: trunk/docs/userguide/en/included/dropDownMenu.xml
===================================================================
--- trunk/docs/userguide/en/included/dropDownMenu.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/dropDownMenu.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -1,368 +1,498 @@
<?xml version="1.0" encoding="UTF-8"?>
<section>
- <sectioninfo>
- <keywordset>
- <keyword>dropDownMenu</keyword>
- </keywordset>
- </sectioninfo>
-
- <table>
- <title>Component identification parameters</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Value</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>component-type</entry>
- <entry>org.richfaces.DropDownMenu</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlDropDownMenu</entry>
- </row>
- <row>
- <entry>component-family</entry>
- <entry>org.richfaces.DropDownMenu</entry>
- </row>
- <row>
- <entry>renderer-type</entry>
- <entry>org.richfaces.DropDownMenuRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.DropDownMenuTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <section>
- <title>Creation on a page</title>
- <para>To create the simplest variant on a page use the following syntax:</para>
- <programlisting role="xml"><![CDATA[...
- <rich:dropDownMenu value="Item1">
- <!--Nested menu components-->
- </rich:dropDownMenu>
-...]]></programlisting>
- </section>
-
- <section>
- <title>Dynamical Creation from Java Code</title>
- <programlisting role="java"><![CDATA[...
+ <sectioninfo>
+ <keywordset>
+ <keyword>dropDownMenu</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+
+ <entry>Value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+
+ <entry>org.richfaces.DropDownMenu</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlDropDownMenu</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.DropDownMenu</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.DropDownMenuRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.DropDownMenuTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>Here is a simple example in a page:</para>
+
+ <programlisting role="xml">...
+ <rich:dropDownMenu value="Item1">
+ <!--Nested menu components-->
+ </rich:dropDownMenu>
+...</programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically from Java</title>
+
+ <programlisting role="java">...
org.richfaces.component.html.HtmlDropDownMenu myMenu = new org.richfaces.component.html.HtmlDropDownMenu();
-...]]></programlisting>
- </section>
-
- <section>
- <title>Details of Usage</title>
- <para>
- All attributes except the "value" are not required. The "value" attribute defines a representation text.
- </para>
- <para>
- Also instead of the "value" attribute you can use the "label" facet.
- </para>
- <para>
- Example.
- </para>
- <programlisting role="xml"><![CDATA[...
- <f:facet name="label">
- <h:graphicImage value="/images/img1.gif"/>
- </f:facet>
-...]]></programlisting>
- <para>
- Use the "event" attribute to define an event on the representation element that triggers a menu appearance. An example of a menu appearance on a click could be seen below.
- </para>
- <programlisting role="xml"><![CDATA[...
- <rich:dropDownMenu event="onclick" value="Item1">
- <!--Nested menu components-->
- </rich:dropDownMenu>
-...]]></programlisting>
- <para>
- Switching mode could be chosen with the <rich:dropDownMenu> attribute "mode" with three possible parameters.
- </para>
- <itemizedlist>
- <listitem><para>Server (on default)</para></listitem>
- </itemizedlist>
- <para>
- The common submission of a form is performed and a page is completely refreshed.
- </para>
- <itemizedlist>
- <listitem><para>Ajax</para></listitem>
- </itemizedlist>
- <para>
- Ajax form submission is performed, additionally specified elements in the "reRender" attribute are reRendered.
- </para>
- <itemizedlist>
- <listitem><para>None</para></listitem>
- </itemizedlist>
- <para>
- The"action" and "actionListener" item's attributes are ignored. Menu items don't fire any submits itself. Behavior is fully defined by the components nested into items.
- </para>
- <note><title>Note:</title>
- As the <rich:dropDownMenu> component doesn't provide its own form, use it in <form>...</h:form>.
- </note>
- <para>
- The "direction" and "jointPoint" attributes are used for the definition ways of menu appearance as it's shown in the example below.
- </para>
- <para>
- Possible values for the "direction" attribute are:
- </para>
- <itemizedlist>
- <listitem><para>top-left - a menu attached to the top-right corner of the label;</para></listitem>
- <listitem><para>top-right - a menu attached to the top-left corner of the label;</para></listitem>
- <listitem><para>bottom-left - a menu attached to the bottom-right corner of the label;</para></listitem>
- <listitem><para>bottom-right - a menu attached to the bottom-left corner of the label;</para></listitem>
- <listitem><para>auto - a smart positioning activation.</para></listitem>
- </itemizedlist>
- <para>
- Possible values for the "jointPoint" attribute are:
- </para>
- <itemizedlist>
- <listitem><para>tr - top-right point of the label element;</para></listitem>
- <listitem><para>tl - top-left point of the label element;</para></listitem>
- <listitem><para>br - bottom-right point of the label element;</para></listitem>
- <listitem><para>bl - bottom-left point of the label element;</para></listitem>
- <listitem><para>auto - smart positioning activation.</para></listitem>
- </itemizedlist>
- <para>
- On default the "direction" and "jointPoint" attributes define as "auto".
- </para>
- <para>
- Example.
- </para>
- <programlisting role="xml"><![CDATA[...
- <rich:dropDownMenu value="Item1" direction="bottom-right" jointPoint="tr">
- <!--Nested menu components-->
- </rich:dropDownMenu>
-...]]></programlisting>
- <para>
- As a result:
- </para>
- <figure>
- <title>Using the "direction" and "joinPoint" attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/dropDownMenu2.png" />
- </imageobject>
- </mediaobject>
- </figure>
- <para>
- You can correct an offset of the popup list relatively to the label using following attributes: "horizontalOffset" and "verticalOffset".
- </para>
- <para>
- Example.
- </para>
- <programlisting role="xml"><![CDATA[...
- <rich:dropDownMenu value="Item1" direction="bottom-right" jointPoint="tr" horizontalOffset="-15" verticalOffset="0">
- <!--Nested menu components-->
- </rich:dropDownMenu>
-...]]>
+...</programlisting>
+ </section>
+
+ <section>
+ <title>Details of Usage</title>
+
+ <para>All attributes except "value" are optional. The "value" attribute
+ defines text to be represented. If you can use the "label" facet, you can
+ even not use the "value" attribute.</para>
+
+ <para>Here is an example:</para>
+
+ <programlisting role="xml">...
+ <f:facet name="label">
+ <h:graphicImage value="/images/img1.gif"/>
+ </f:facet>
+...</programlisting>
+
+ <para>Use the "event" attribute to define an event for the represented
+ element that triggers a menu appearance. An example of a menu appearance
+ on a click can be seen below.</para>
+
+ <programlisting role="xml">...
+ <rich:dropDownMenu event="onclick" value="Item1">
+ <!--Nested menu components-->
+ </rich:dropDownMenu>
+...</programlisting>
+
+ <para>The <rich:dropDownMenu> "mode" attribute can be set to three
+ possible parameters:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Server (default)</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The standard form submission is performed and the page is completely
+ refreshed.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Ajax</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>An AJAX form submission is performed, and specified elements in the
+ "reRender" attribute are rerendered.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>None</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The "action" and "actionListener" item's attributes are ignored.
+ Menu items don't fire any submits themselves. The behavior is fully
+ defined by the components nested inside items.</para>
+
+ <note><title>Note:</title> As the <rich:dropDownMenu> component
+ doesn't provide its own form, use it between <h:form> and
+ </h:form> tags.</note>
+
+ <para>The "direction" and "jointPoint" attributes are used for defining
+ aspects of menu appearance.</para>
+
+ <para>Possible values for the "direction" attribute are:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>top-left - a menu attached to the top-right corner of the
+ label</para>
+ </listitem>
+
+ <listitem>
+ <para>top-right - a menu attached to the top-left corner of the
+ label</para>
+ </listitem>
+
+ <listitem>
+ <para>bottom-left - a menu attached to the bottom-right corner of the
+ label</para>
+ </listitem>
+
+ <listitem>
+ <para>bottom-right - a menu attached to the bottom-left corner of the
+ label</para>
+ </listitem>
+
+ <listitem>
+ <para>auto - a smart positioning activation</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Possible values for the "jointPoint" attribute are:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>tr - top-right point of the label element</para>
+ </listitem>
+
+ <listitem>
+ <para>tl - top-left point of the label element</para>
+ </listitem>
+
+ <listitem>
+ <para>br - bottom-right point of the label element</para>
+ </listitem>
+
+ <listitem>
+ <para>bl - bottom-left point of the label element</para>
+ </listitem>
+
+ <listitem>
+ <para>auto - smart positioning activation</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>By default, the "direction" and "jointPoint" attributes are set to
+ "auto".</para>
+
+ <para>Here is an example:</para>
+
+ <programlisting role="xml">...
+ <rich:dropDownMenu value="Item1" direction="bottom-right" jointPoint="tr">
+ <!--Nested menu components-->
+ </rich:dropDownMenu>
+...</programlisting>
+
+ <para>This is the result:</para>
+
+ <figure>
+ <title>Using the "direction" and "joinPoint" attributes</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropDownMenu2.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can correct an offset of the pop-up list relative to the label
+ using the following attributes: "horizontalOffset" and
+ "verticalOffset".</para>
+
+ <para>Here is an example:</para>
+
+ <programlisting role="xml">...
+ <rich:dropDownMenu value="Item1" direction="bottom-right" jointPoint="tr" horizontalOffset="-15" verticalOffset="0">
+ <!--Nested menu components-->
+ </rich:dropDownMenu>
+...
</programlisting>
- <para>
- As a result:
- </para>
- <figure>
- <title>Using the "horizontalOffset" and "verticalOffset" attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/dropDownMenu3.png" />
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section>
- <title> Look and Feel Customization</title>
- <para>
- For skinnability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
- </para>
- <para>
- There are two ways to redefine appearance of all dropDownMenus at once:
- </para>
- <itemizedlist>
- <listitem><para>Redefine corresponding skin parameters.</para></listitem>
- <listitem><para>Add to user's stylesheets style classes used by a dropDownMenu.</para></listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Skin parameters redefinition</title>
- <table>
- <title>Label Skin parameters redefinition</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters for label div element</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>generalFamilyFont</entry>
- <entry>font-family</entry>
- </row>
- <row>
- <entry>generalSizeFont</entry>
- <entry>font-size</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Label Skin parameters redefinition</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters for selected label element</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
- <row>
- <entry>controlBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
- <row>
- <entry>generalTextColor</entry>
- <entry>background-colorcolor</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Popup Skin parameters redefinition</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters for border element</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Popup Skin parameters redefinition</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters for background element</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>border-top-color</entry>
- </row>
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>border-left-color</entry>
- </row>
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>border-right-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
- <section>
- <title> Definition custom style classes </title>
- <para>
- On the screenshot, there are classes names that define element label.
- </para>
- <figure>
- <title>Classes names</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/dropDownMenu4.png" />
- </imageobject>
- </mediaobject>
- </figure>
- <table>
- <title>Classes names that define element label</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Rich-label-text-decor</entry>
- <entry>Defines the text style of a representation element</entry>
- </row>
- <row>
- <entry>Rich-ddmenu-label</entry>
- <entry>Defines the class for wrapping div element of a representation element</entry>
- </row>
- <row>
- <entry>Rich-ddmenu-label-select</entry>
- <entry>Defines the class for wrapping div element of the selected representation element</entry>
- </row>
- <row>
- <entry>Rich-ddmenu-label-unselect</entry>
- <entry>Defines the class for wrapping div element of a representation element that isn't selected</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>
- On the screenshot, there are classes names that define element popup.
- </para>
- <figure>
- <title>Classes names</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/dropDownMenu5.png" />
- </imageobject>
- </mediaobject>
- </figure>
- <table>
- <title>Classes names that define element popup</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Rich-menu-list-border</entry>
- <entry>Defines a class for borders elements</entry>
- </row>
- <row>
- <entry>Rich-menu-list-border</entry>
- <entry>Defines the class for a general background list</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>
- In order to redefine style for all dropDownMenus on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
- </para>
- <para>
- To change style peculiarities of the particular dropDownMenus define your own style classes in the corresponding simple dropDownMenu attributes.
- </para>
- </section>
- </section>
+ <para>This is the result:</para>
+
+ <figure>
+ <title>Using the "horizontalOffset" and "verticalOffset"
+ attributes</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropDownMenu3.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Look-and-Feel Customization</title>
+
+ <para>For skinability implementation, the components use a style class
+ redefinition method. Default style classes are mapped on skin
+ parameters.</para>
+
+ <para>There are two ways to redefine the appearance of all dropDownMenus
+ at once:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
+
+ <listitem>
+ <para>Add to a user's stylesheets style classes used by a
+ dropDownMenu</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title> Redefinition of Skin Parameters</title>
+
+ <table>
+ <title>Label Skin parameters redefinition</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters for label div element</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>generalFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>generalSizeFont</entry>
+
+ <entry>font-size</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Label Skin parameters redefinition</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters for selected label element</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>generalTextColor</entry>
+
+ <entry>background-colorcolor</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Popup Skin parameters redefinition</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters for border element</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ <row>
+ <entry>additionalBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Popup Skin parameters redefinition</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters for background element</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>additionalBackgroundColor</entry>
+
+ <entry>border-top-color</entry>
+ </row>
+
+ <row>
+ <entry>additionalBackgroundColor</entry>
+
+ <entry>border-left-color</entry>
+ </row>
+
+ <row>
+ <entry>additionalBackgroundColor</entry>
+
+ <entry>border-right-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <para>In the screenshot, there are classes names that define the element
+ label.</para>
+
+ <figure>
+ <title>Classes names</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropDownMenu4.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table>
+ <title>Classes names that define element label</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Rich-label-text-decor</entry>
+
+ <entry>Defines the text style of a representation element</entry>
+ </row>
+
+ <row>
+ <entry>Rich-ddmenu-label</entry>
+
+ <entry>Defines the class for wrapping div element of a
+ representation element</entry>
+ </row>
+
+ <row>
+ <entry>Rich-ddmenu-label-select</entry>
+
+ <entry>Defines the class for wrapping div element of the selected
+ representation element</entry>
+ </row>
+
+ <row>
+ <entry>Rich-ddmenu-label-unselect</entry>
+
+ <entry>Defines the class for wrapping div element of a
+ representation element that isn't selected</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In the screenshot, there are classes names that define an element
+ pop-up.</para>
+
+ <figure>
+ <title>Classes names</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropDownMenu5.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table>
+ <title>Classes names that define element popup</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Rich-menu-list-border</entry>
+
+ <entry>Defines a class for borders elements</entry>
+ </row>
+
+ <row>
+ <entry>Rich-menu-list-border</entry>
+
+ <entry>Defines the class for a general background list</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In order to redefine the style for all drop-down menus on a page
+ using CSS, it's enough to create classes with the same names and define
+ the necessary properties in them.</para>
+
+ <para>To change the style peculiarities of the particular drop-down menus
+ define your own style classes in the corresponding dropDownMenu
+ attributes.</para>
+ </section>
+</section>
\ No newline at end of file
Modified: trunk/docs/userguide/en/included/menuItem.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/menuItem.desc.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/menuItem.desc.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -7,7 +7,7 @@
</sectioninfo>
<section>
<title>Description</title>
- <para>The <emphasis role="bold"><rich:menuItem></emphasis> component is used for definition the single item inside of popup list.</para>
+ <para>The <emphasis role="bold"><rich:menuItem></emphasis> component is used for the definition of a single item inside a pop-up list.</para>
<figure>
<title><rich:menuItem> component</title>
<mediaobject>
@@ -20,9 +20,9 @@
<section>
<title>Key Features</title>
<itemizedlist>
- <listitem><para>Highly customizable look and feel</para></listitem>
+ <listitem><para>Highly customizable look-and-feel</para></listitem>
<listitem><para>Different submission modes</para></listitem>
- <listitem><para>Disablement support</para></listitem>
+ <listitem><para>Support for disabling</para></listitem>
<listitem><para>Custom content support</para></listitem>
</itemizedlist>
Modified: trunk/docs/userguide/en/included/menuItem.xml
===================================================================
--- trunk/docs/userguide/en/included/menuItem.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/menuItem.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -41,8 +41,8 @@
</table>
<section>
- <title>Creation on a page</title>
- <para>To create the simplest variant on a page use the following syntax:</para>
+ <title>Creating the Component with a Page Tag</title>
+ <para>Here is a simple example in a page:</para>
<programlisting role="xml"><![CDATA[...
<rich:dropDownMenu>
...
@@ -53,7 +53,7 @@
</section>
<section>
- <title>Dynamical Creation from Java Code</title>
+ <title>Creating the Component Dynamically from Java</title>
<programlisting role="java"><![CDATA[...
org.richfaces.component.html.HtmlMenuItem myItem = new org.richfaces.component.html.HtmlMenuItem ();
...]]></programlisting>
@@ -62,13 +62,13 @@
<section>
<title>Details of Usage</title>
<para>
- The "value" attribute defines text representation for an item element.
+ The "value" attribute defines the text representation for an item element.
</para>
<para>
- The "icon" attribute defines an icon. The "iconDisabled" attribute defines an icon for a disabled item. Also you can use the "icon" and "iconDisabled" facets. If the facets are defined, the corresponding "icon" and "iconDisabled" attributes are ignored and the facets content is shown as an icon. It could be used for items checkboxes implementation.
+ There are two icon-related attributes. The "icon" attribute defines an icon. The "iconDisabled" attribute defines an icon for a disabled item. Also you can use the "icon" and "iconDisabled" facets. If the facets are defined, the corresponding "icon" and "iconDisabled" attributes are ignored and the facets content is shown as an icon. It could be used for an item check box implementation.
</para>
<para>
- Example.
+ Here is an example:
</para>
<programlisting role="xml"><![CDATA[...
<f:facet name="icon">
@@ -76,32 +76,41 @@
</f:facet>
...]]></programlisting>
+ <para>The <rich: menuItem> "mode" attribute can be set to three
+ possible parameters:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Server (default)</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The standard form submission is performed and the page is completely
+ refreshed.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Ajax</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>An AJAX form submission is performed, and specified elements in the
+ "reRender" attribute are rerendered.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>None</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The "action" and "actionListener" item's attributes are ignored.
+ Menu items don't fire any submits themselves. The behavior is fully
+ defined by the components nested inside items.</para>
<para>
- A switching mode could be chosen with the <rich: menuItem> attribute "mode" with three possible parameters.
+ For example, you can put any content into an item, but, in this case, you should set the "mode" attribute as "none".
</para>
- <itemizedlist>
- <listitem><para>Server (on default)</para></listitem>
- </itemizedlist>
<para>
- The common submission of the form is performed and a page is completely refreshed.
- </para>
- <itemizedlist>
- <listitem><para>Ajax</para></listitem>
- </itemizedlist>
- <para>
- Ajax form submission is performed, additionally specified elements in the "reRender" attribute are reRendered.
- </para>
- <itemizedlist>
- <listitem><para>None</para></listitem>
- </itemizedlist>
- <para>
- The "action" and "actionListener" items attributes are ignored. Menu items don't fire any submits itself. Behavior is fully defined by components nested to items.
- </para>
- <para>
- For example, you can put any content into an item but in this case you should set the "mode" attribute as "none".
- </para>
- <para>
- Example.
+ Here is an example:
</para>
<programlisting role="xml"><![CDATA[...
<rich:dropDownMenu>
@@ -113,10 +122,10 @@
<rich:dropDownMenu>
...]]></programlisting>
<para>
- You can use the "disabled" attribute to set item state.
+ You can use the "disabled" attribute to set the item state.
</para>
<para>
- Example.
+ Here is an example:
</para>
<programlisting role="xml"><![CDATA[...
<rich:dropDownMenu>
@@ -126,22 +135,22 @@
</section>
<section>
- <title> Look and Feel Customization</title>
+ <title> Look-and-Feel Customization</title>
<para>
- For skinnability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
+ For skinability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
</para>
<para>
- There are two ways to redefine appearance of all menuItems at once:
+ There are two ways to redefine the appearance of all menuItems at once:
</para>
<itemizedlist>
- <listitem><para>Redefine corresponding skin parameters.</para></listitem>
- <listitem><para>Add to user's stylesheets style classes used by a menuItem.</para></listitem>
+ <listitem><para>Redefine the corresponding skin parameters</para></listitem>
+ <listitem><para>Add to user's stylesheets style classes used by a menuItem</para></listitem>
</itemizedlist>
</section>
<section>
<title>Skin parameters redefinition</title>
<table>
- <title>Label Skin parameters redefinition</title>
+ <title>Label skin parameters redefinition</title>
<tgroup cols="2">
<thead>
<row>
@@ -163,7 +172,7 @@
</table>
<table>
- <title>Label Skin parameters redefinition</title>
+ <title>Label skin parameters redefinition</title>
<tgroup cols="2">
<thead>
<row>
@@ -185,7 +194,7 @@
</table>
<table>
- <title>Label Skin parameters redefinition</title>
+ <title>Label skin parameters redefinition</title>
<tgroup cols="2">
<thead>
<row>
@@ -203,7 +212,7 @@
</table>
<table>
- <title>Label Skin parameters redefinition</title>
+ <title>Label skin parameters redefinition</title>
<tgroup cols="2">
<thead>
<row>
@@ -222,12 +231,12 @@
</section>
<section>
- <title> Definition custom style classes </title>
+ <title> Definition of Custom Style Classes </title>
<para>
- On the screenshot, there are classes names that define item element appearance.
+ In the screenshot, the classes names that define item element appearance are shown.
</para>
<figure>
- <title>Classes names</title>
+ <title>Class names</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/menuItem2.png" />
@@ -235,7 +244,7 @@
</mediaobject>
</figure>
<table>
- <title>Classes names that define item element appearance.</title>
+ <title>Class names that define item element appearance.</title>
<tgroup cols="2">
<thead>
<row>
@@ -260,10 +269,10 @@
</tgroup>
</table>
<para>
- All listed elements except of general are defined for disabled, enabled and hovered modes.
+ All listed elements except the general ones are defined for disabled, enabled, and hovered modes.
</para>
<table>
- <title>Classes names for modes</title>
+ <title>Class names for modes</title>
<tgroup cols="2">
<thead>
<row>
@@ -306,17 +315,17 @@
<entry>Defines properties for the text</entry>
</row>
<row>
- <entry>Rich-menu-item-icon-selectedr</entry>
+ <entry>Rich-menu-item-icon-selected</entry>
<entry>Defines properties for the left icon element</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
- In order to redefine style for all menuItems on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
+ In order to redefine the style for all menuItems on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
</para>
<para>
- To change style peculiarities of the particular menuItems define your own style classes in the corresponding simple menuItem attributes.
+ To change the style of particular menuItems define your own style classes in the corresponding menuItem attributes.
</para>
</section>
</section>
Modified: trunk/docs/userguide/en/included/menuSeparator.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/menuSeparator.desc.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/menuSeparator.desc.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -7,7 +7,7 @@
</sectioninfo>
<section>
<title>Description</title>
- <para>The <rich:menuSeparator> component is used for definition of a horizontal separator that can be placed between groups or items.</para>
+ <para>The <rich:menuSeparator> component is used for the definition of a horizontal separator that can be placed between groups or items.</para>
<figure>
<title><rich:menuSeparator></title>
<mediaobject>
Modified: trunk/docs/userguide/en/included/menuSeparator.xml
===================================================================
--- trunk/docs/userguide/en/included/menuSeparator.xml 2007-05-14 21:41:59 UTC (rev 757)
+++ trunk/docs/userguide/en/included/menuSeparator.xml 2007-05-14 21:45:38 UTC (rev 758)
@@ -41,8 +41,8 @@
</table>
<section>
- <title>Creation on a page</title>
- <para>To create the simplest variant on a page use the following syntax:</para>
+ <title>Creating the Component with a Page Tag</title>
+ <para>Here is a simple example in a page:</para>
<programlisting role="xml"><![CDATA[...
<rich:dropDownMenu/>
...
@@ -53,29 +53,29 @@
</section>
<section>
- <title>Dynamical Creation from Java Code</title>
+ <title>Creating the Component Dynamically from Java</title>
<programlisting role="java"><![CDATA[...
org.richfaces.component.html.HtmlMenuSeparator mySep = new org.richfaces.component.html.HtmlMenuSeparator ();
...]]></programlisting>
</section>
<section>
- <title> Look and Feel Customization</title>
+ <title>Look-and-Feel Customization</title>
<para>
- For skinnability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
+ For skinability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
</para>
<para>
- There are two ways to redefine appearance of all menuSeparators at once:
+ There are two ways to redefine the appearance of all menuSeparators at once:
</para>
<itemizedlist>
- <listitem><para>Redefine corresponding skin parameters.</para></listitem>
- <listitem><para>Add to user's stylesheets style classes used by a menuSeparator.</para></listitem>
+ <listitem><para>Redefine the corresponding skin parameters</para></listitem>
+ <listitem><para>Add to user's stylesheets style classes used by a menuSeparator</para></listitem>
</itemizedlist>
</section>
<section>
- <title>Skin parameters redefinition</title>
+ <title>Redefinition of Skin Parameters</title>
<table>
- <title>Label Skin parameters redefinition</title>
+ <title>Label skin parameters redefinition</title>
<tgroup cols="2">
<thead>
<row>
@@ -93,9 +93,9 @@
</table>
</section>
<section>
- <title> Definition custom style classes </title>
+ <title>Definition of Custom Style Classes</title>
<para>
- On the screenshot, there are classes names that define separator element appearance.
+ In the screenshot, there are the classes names that define separator element appearance.
</para>
<figure>
<title>Classes names</title>
@@ -123,10 +123,10 @@
</tgroup>
</table>
<para>
- In order to redefine style for all menuSeparators on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
+ In order to redefine a style for all menuSeparators in a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
</para>
<para>
- To change style peculiarities of the particular menuSeparators define your own style classes in the corresponding simple menuSeparator attributes.
+ To change the style peculiarities of the particular menuSeparators, define your own style classes in the corresponding menuSeparator attributes.
</para>
</section>
</section>
17 years, 8 months