JBoss Rich Faces SVN: r1087 - trunk/sandbox/panelmenu/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-07 14:21:53 -0400 (Thu, 07 Jun 2007)
New Revision: 1087
Modified:
trunk/sandbox/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
Modified: trunk/sandbox/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/sandbox/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-06-07 18:19:08 UTC (rev 1086)
+++ trunk/sandbox/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-06-07 18:21:53 UTC (rev 1087)
@@ -13,7 +13,6 @@
<f:clientid var="clientId"/>
<tr id="tdhide#{clientId}" style="#{this:getHideStyle(context, component)}" >
- <!-- "#{this:getHideStyle(context, component)}" -->
<td>
<jsp:scriptlet>
<![CDATA[
17 years, 7 months
JBoss Rich Faces SVN: r1086 - in trunk/sandbox/panelmenu/src/main: java/org/richfaces/renderkit/iconImages and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-07 14:19:08 -0400 (Thu, 07 Jun 2007)
New Revision: 1086
Added:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevron.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronDown.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronUp.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconGrid.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangle.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleDown.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleUp.java
Removed:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java
Modified:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java
trunk/sandbox/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
Modified: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -244,13 +244,14 @@
private void addActionIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
//TODO by nick - dima - use CommandScriptBuilder
if (child instanceof UIPanelMenuItem){
- if (child.getChildCount()>0){
- buffer.append(",'panelMenuItemAction'");
+ if (((UIPanelMenuItem)child).getAction() == null){
+ buffer.append(",false");
} else {
- ViewHandler viewHandler = context.getApplication().getViewHandler();
- String viewId = context.getViewRoot().getViewId();
- String actionUrl = context.getExternalContext().encodeActionURL(viewHandler.getActionURL(context, viewId));
- buffer.append(",'"+actionUrl+"'");
+// ViewHandler viewHandler = context.getApplication().getViewHandler();
+// String viewId = context.getViewRoot().getViewId();
+// String actionUrl = context.getExternalContext().encodeActionURL(viewHandler.getActionURL(context, viewId));
+// buffer.append(",'"+actionUrl+"'");
+ buffer.append(",true");
}
} else {
if (((UIPanelMenuGroup)child).getAction()!=null&&!((UIPanelMenuGroup)child).getAction().equals("")){
Modified: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -35,16 +35,15 @@
import org.richfaces.component.panelmenu.UIPanelMenu;
import org.richfaces.component.panelmenu.UIPanelMenuGroup;
import org.richfaces.component.panelmenu.UIPanelMenuItem;
-import org.richfaces.renderkit.iconImages.PanelMenuIconArrow;
-import org.richfaces.renderkit.iconImages.PanelMenuIconArrowDown;
-import org.richfaces.renderkit.iconImages.PanelMenuIconArrowUp;
+import org.richfaces.renderkit.iconImages.PanelMenuIconTriangle;
+import org.richfaces.renderkit.iconImages.PanelMenuIconTriangleDown;
+import org.richfaces.renderkit.iconImages.PanelMenuIconTriangleUp;
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.PanelMenuIconGrid;
+import org.richfaces.renderkit.iconImages.PanelMenuIconChevron;
+import org.richfaces.renderkit.iconImages.PanelMenuIconChevronDown;
+import org.richfaces.renderkit.iconImages.PanelMenuIconChevronUp;
import org.richfaces.renderkit.iconImages.PanelMenuIconSpacer;
-import org.richfaces.renderkit.iconImages.PanelMenuIconSquare;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
/**
@@ -109,27 +108,26 @@
color = (String) skin.getParameter(context,"panelmenu.itemBulletColor");
}
if(iconType != null && !iconType.equals("none")){
- //TODO by nick - dima - why not call image classes by their names in doc. Eg. not PanelMenuIconArrowUp, but PanelMenuChevronImage
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);
+ source = getResource(PanelMenuIconTriangle.class.getName()).getUri(context, color);
} else if (iconType.equals("triangleDown")) {
- source = getResource(PanelMenuIconArrowDown.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconTriangleDown.class.getName()).getUri(context, color);
} else if (iconType.equals("triangleUp")) {
- source = getResource(PanelMenuIconArrowUp.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconTriangleUp.class.getName()).getUri(context, color);
} else if (iconType.equals("chevron")) {
- source = getResource(PanelMenuIconDoubleArrow.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconChevron.class.getName()).getUri(context, color);
} else if (iconType.equals("chevronUp")) {
- source = getResource(PanelMenuIconDoubleArrowUp.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconChevronUp.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);
+ source = getResource(PanelMenuIconChevronDown.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);
+ source = getResource(PanelMenuIconGrid.class.getName()).getUri(context, color);
} else {
//TODO by nick - dima - TemplateContext is deprecated and shouldn't be used
source = (String)getUtils().encodeResourceURL(new TemplateContext(this,context,component),iconType);
@@ -150,21 +148,12 @@
return (UIPanelMenu) parent;
}
-// public String getHideStyle(FacesContext context, UIComponent component) {
-// if (!(component.getParent() instanceof UIPanelMenu)) {
-// CSSFormat format = new CSSFormat();
-// format.add("display", "none");
-// return format.toString();
-// }
-// return "";
-// }
public String getHideStyle(FacesContext context, UIComponent component) {
if (!(component.getParent() instanceof UIPanelMenu)) {
CSSFormat format = new CSSFormat();
format.add("display", "none");
if(component.getParent() instanceof UIPanelMenuGroup) {
UIPanelMenuGroup parent = (UIPanelMenuGroup)component.getParent();
- //TODO by nick - dima - take opened value from component itself
PanelMenuGroupRenderer renderer = (PanelMenuGroupRenderer) context.getRenderKit().getRenderer(parent.getFamily(), parent.getRendererType());
try {
if ( renderer.isOpened(context, parent) ){
@@ -172,15 +161,12 @@
} else
return format.toString();
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
} else return format.toString();
}
return "";
-
}
-
public void insertValue(FacesContext context, UIComponent component) throws IOException {
Object value = component.getAttributes().get("value");
@@ -189,30 +175,6 @@
}
}
-
-// 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";
-// }
-// } else {
-// boolean isParentDisabled = isParentDisabled(component);
-// if(component instanceof UIPanelMenuGroup){
-// if( ((UIPanelMenuGroup)component).isExpanded() && !((UIPanelMenuGroup)component).isDisabled() && !isParentDisabled ){
-// return "opened";
-// } else {
-// //check expanded attributes in children groups, if exists
-// boolean isChildrenExpanded = isChildrenExpanded(component);
-// return isChildrenExpanded && !isParentDisabled && !((UIPanelMenuGroup)component).isDisabled() ? "opened" : "closed";
-// }
-// }
-// }
-// return "closed";
-// }
-
protected boolean isChildrenExpanded(UIComponent component){
if (component.getChildren() != null){
Iterator itr = component.getChildren().iterator();
@@ -261,11 +223,9 @@
protected String getItemMode(UIComponent component) {
String parentExpandMode = findMenu(component).getExpandMode();
String parentMode = findMenu(component).getMode();
- //TODO by nick - dima - always evaluates to false
- if (null == parentMode && "".equals(parentMode))
+ if (null == parentMode || "".equals(parentMode))
parentMode = "server";
- //TODO by nick - dima - always evaluates to false
- if (null == parentExpandMode && "".equals(parentExpandMode))
+ if (null == parentExpandMode || "".equals(parentExpandMode))
parentExpandMode = "none";
String mode = "none";
if (component instanceof UIPanelMenuGroup) {
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,62 +0,0 @@
-/**
- * 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() {
- //TODO by nick - dima - move the code to super class constructor
- 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
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,66 +0,0 @@
-/**
- * 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);
- }
-}
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,65 +0,0 @@
-/**
- * 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);
- }
-}
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevron.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevron.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevron.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,81 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconChevron extends PanelMenuIconBasic {
+
+ 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
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronDown.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronDown.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronDown.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,80 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconChevronDown extends PanelMenuIconBasic {
+
+ 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
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronUp.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronUp.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconChevronUp.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,80 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconChevronUp extends PanelMenuIconBasic {
+
+ 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
Modified: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDisc.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -26,21 +26,12 @@
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);
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,71 +0,0 @@
-/**
- * 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
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrow.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,90 +0,0 @@
-/**
- * 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
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowDown.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,89 +0,0 @@
-/**
- * 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
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDoubleArrowUp.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,89 +0,0 @@
-/**
- * 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
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconGrid.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconDots.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconGrid.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconGrid.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,63 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconGrid extends PanelMenuIconBasic {
+
+
+ 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
Modified: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSpacer.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -22,21 +22,11 @@
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) {
}
Deleted: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconSquare.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -1,70 +0,0 @@
-/**
- * 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
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangle.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrow.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangle.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangle.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,51 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+public class PanelMenuIconTriangle extends PanelMenuIconBasic {
+
+ 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
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleDown.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowDown.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleDown.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleDown.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,57 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconTriangleDown extends PanelMenuIconBasic {
+
+ 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);
+ }
+}
Copied: trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleUp.java (from rev 991, trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconArrowUp.java)
===================================================================
--- trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleUp.java (rev 0)
+++ trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/iconImages/PanelMenuIconTriangleUp.java 2007-06-07 18:19:08 UTC (rev 1086)
@@ -0,0 +1,56 @@
+/**
+ * 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 org.ajax4jsf.framework.resource.ResourceContext;
+
+
+
+public class PanelMenuIconTriangleUp extends PanelMenuIconBasic {
+
+ 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);
+ }
+}
Modified: trunk/sandbox/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/sandbox/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-06-07 17:45:47 UTC (rev 1085)
+++ trunk/sandbox/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-06-07 18:19:08 UTC (rev 1086)
@@ -190,7 +190,8 @@
trigger: function(e){
if ("none" == this.mode)
return;
- if (this.action !="panelMenuItemAction"){
+// if (this.action !="panelMenuItemAction"){
+ if (this.action){
this.preTrigger(e);
var form = Event.findElement(e, "form");
if ("server" == this.mode) {
17 years, 7 months
JBoss Rich Faces SVN: r1085 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-07 13:45:47 -0400 (Thu, 07 Jun 2007)
New Revision: 1085
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
Log:
made data model work with keys more correctly
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2007-06-07 17:45:01 UTC (rev 1084)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2007-06-07 17:45:47 UTC (rev 1085)
@@ -3,11 +3,11 @@
*/
package org.richfaces.demo.datagrid.bean;
-import java.io.Serializable;
import java.util.List;
import org.richfaces.demo.datagrid.model.Channel;
import org.richfaces.demo.datagrid.model.Issue;
+import org.richfaces.demo.datagrid.model.Key;
import org.richfaces.model.GridDataModel;
import org.richfaces.model.SortOrder;
@@ -24,7 +24,7 @@
*/
@Override
public Object getObjectById(Object id) {
- return channel.findById((Integer) id);
+ return channel.findIssueByKey((Key) id);
}
/* (non-Javadoc)
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2007-06-07 17:45:01 UTC (rev 1084)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2007-06-07 17:45:47 UTC (rev 1085)
@@ -14,12 +14,12 @@
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.richfaces.model.Entity;
import org.richfaces.model.SortOrder;
@@ -281,6 +281,17 @@
return getIndex().get(id);
}
+ public Issue findIssueByKey(Object id) {
+
+ for (Issue issue : getIssues()) {
+ if (issue.getId().equals(id)) {
+ return issue;
+ }
+ }
+
+ return null;
+ }
+
public void replace(Integer id, List<Issue> list) {
Issue issue = issues.get(id.intValue());
issues.removeAll(list);
17 years, 7 months
JBoss Rich Faces SVN: r1084 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-07 13:45:01 -0400 (Thu, 07 Jun 2007)
New Revision: 1084
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
fixed clickthrough element
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-07 15:39:23 UTC (rev 1083)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-07 17:45:01 UTC (rev 1084)
@@ -97,6 +97,8 @@
for(var i=0; i<childs.length; i++) {
if(childs[i].tagName && childs[i].tagName.toLowerCase() == "div") {
this.container = new ClientUI.common.box.Box(childs[i], null, true);
+ this.container.makeAbsolute();
+ this.container.setStyle({'z-index' : 100});
if(!ClientUILib.isIE) this.container.setStyle({overflow: 'hidden'});
break;
}
@@ -107,6 +109,7 @@
this.scrollBox.makeAbsolute();
this.scrollBox.setWidth(this.getWidth());
this.scrollBox.setHeight(this.getHeight());
+ this.scrollBox.setStyle({'z-index' : 0});
this.sizeBox = new ClientUI.common.box.Box(null, this.scrollBox.getElement());
this.sizeBox.makeAbsolute();
@@ -260,7 +263,8 @@
this.contentBox.setHeight(height - fixH);
this.frozenContentBox.setWidth(frozenContentWidth);
this.frozenContentBox.setHeight(height - fixH);
-
+ this.container.setHeight(height - fixH);
+
var scrollPos = Math.min(totalWidth - viewWidth, scrollLeft);
this.grid.adjustScrollPosition(scrollPos);
17 years, 7 months
JBoss Rich Faces SVN: r1083 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-07 11:39:23 -0400 (Thu, 07 Jun 2007)
New Revision: 1083
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-07 15:33:37 UTC (rev 1082)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-07 15:39:23 UTC (rev 1083)
@@ -24,13 +24,14 @@
{pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" + "GridFooterTemplate"}
];
this.init2 = this.init.bindAsEventListener(this);
+
// this.init()
},
+
+// initialize parent Grid
init: function(){
-
ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
-
var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
this.setProgressCtrl(progress);
Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
17 years, 7 months
JBoss Rich Faces SVN: r1082 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-07 11:33:37 -0400 (Thu, 07 Jun 2007)
New Revision: 1082
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-07 15:33:26 UTC (rev 1081)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-07 15:33:37 UTC (rev 1082)
@@ -190,7 +190,7 @@
var #{this:getJavaScriptVarName(context, component)} = #{this:createClientScrollableGrid(context, component)};
#{this:getScriptContributions(context, component)};
- Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init2);
+ Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init2 );
// ]]>
</script>
17 years, 7 months
JBoss Rich Faces SVN: r1081 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-07 11:33:26 -0400 (Thu, 07 Jun 2007)
New Revision: 1081
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-07 14:51:18 UTC (rev 1080)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-07 15:33:26 UTC (rev 1081)
@@ -2,55 +2,48 @@
ClientUI.controls.grid.ScrollableGrid = Class.create({
CLASSDEF: {
- name: 'ClientUI.controls.grid.ScrollableGrid'
+ name: 'ClientUI.controls.grid.ScrollableGrid',
+ parent: ClientUI.controls.grid.Grid
}
});
Object.extend(ClientUI.controls.grid.ScrollableGrid.prototype, {
initialize: function(options) {
-
+
this.options = options;
this.client_id = this.options.client_id;
-
+ this.rows_count = $(this.client_id + "_rows_input").value;
this.columns_count = this.options.columnsCount;
this.splash_id = this.options.splash_id;
- this.rows_count = $(this.client_id + "_rows_input").value;
+ this.dataModel = new ClientUI.controls.grid.FakeArrayDataModel(this.rows_count, this.columns_count, this.client_id);
+
+ this.templates = [
+ {pane: GridLayout_Enum.HEADER, ref: this.client_id +"_" + "GridHeaderTemplate"},
+ {pane: GridLayout_Enum.BODY, ref: this.client_id +"_" + "GridBodyTemplate"},
+ {pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" + "GridFooterTemplate"}
+ ];
this.init2 = this.init.bindAsEventListener(this);
+// this.init()
},
init: function(){
+
+ ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
- this.dataModel = new ClientUI.controls.grid.FakeArrayDataModel(this.rows_count, this.columns_count, this.client_id);
-
- var templates = [
- {pane: GridLayout_Enum.HEADER, ref: this.client_id +"_" + "GridHeaderTemplate"},
- {pane: GridLayout_Enum.BODY, ref: this.client_id +"_" + "GridBodyTemplate"},
- {pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" + "GridFooterTemplate"}
- ];
-
- // create the Grid
- this.grid = new ClientUI.controls.grid.Grid(this.client_id, this.dataModel, templates,
- {
- showIndexColumn: false,
- indexColumnWidth: 40
- }
- );
-
var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
-
- this.grid.setProgressCtrl(progress);
- Event.observe(this.grid.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
+ this.setProgressCtrl(progress);
+ Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
},
onSortComplete : function(request, event, data){
var options = request.getJSON("options");
- AjaxUpdater.updateRows(options,request, this.grid, this.client_id);
+ AjaxUpdater.updateRows(options,request, this, this.client_id);
},
onScrollComplete : function(request, event, data){
var options = this.dataModel.getCurrentOptions();
- AjaxUpdater.updateRows(options,request,this.grid,this.client_id);
+ AjaxUpdater.updateRows(options,request,this,this.client_id);
},
onSorted: function(sortEvent) {
17 years, 7 months
JBoss Rich Faces SVN: r1080 - in trunk/richfaces/tabPanel/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-07 10:51:18 -0400 (Thu, 07 Jun 2007)
New Revision: 1080
Modified:
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-234
Modified: trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
--- trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-06-07 14:17:39 UTC (rev 1079)
+++ trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-06-07 14:51:18 UTC (rev 1080)
@@ -25,6 +25,7 @@
import org.ajax4jsf.framework.renderer.ComponentVariables;
import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.HtmlDimensions;
import org.ajax4jsf.framework.util.javascript.JSReference;
import org.ajax4jsf.framework.util.javascript.ScriptUtils;
import org.richfaces.component.UISwitchablePanel;
@@ -307,4 +308,15 @@
protected TabInfoCollector getTabInfoCollector() {
return collector;
}
+
+ public String encodeHeaderSpacing(FacesContext context, UITabPanel pane) throws IOException {
+ String headerSpacing = pane.getHeaderSpacing();
+ Double decoded = HtmlDimensions.decode(headerSpacing);
+ if (decoded.doubleValue() != 0) {
+ return "width: " + HtmlUtil.qualifySize(headerSpacing);
+ } else {
+ return "";
+ }
+ }
+
}
Modified: trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx
===================================================================
--- trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx 2007-06-07 14:17:39 UTC (rev 1079)
+++ trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx 2007-06-07 14:51:18 UTC (rev 1080)
@@ -38,11 +38,11 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
- <td><img src="#{spacer}" width="2" height="1" alt=""
- border="0" /></td>
+ <td>
+ <img src="#{spacer}" height="1" alt=""
+ border="0" style="#{this:encodeHeaderSpacing(context, component)}" />
+ </td>
<f:call name="encodeTabs" />
- <td><img src="#{spacer}" width="1" height="1" alt=""
- border="0" /></td>
</tr>
</table>
<c:if test="#{clientSide}">
17 years, 7 months
JBoss Rich Faces SVN: r1079 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-07 10:17:39 -0400 (Thu, 07 Jun 2007)
New Revision: 1079
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
Log:
put correct input name
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2007-06-07 14:14:31 UTC (rev 1078)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2007-06-07 14:17:39 UTC (rev 1079)
@@ -36,7 +36,7 @@
public static final String getSelectionInputName(FacesContext context,
UIScrollableGrid grid) {
- String id = grid.getBaseClientId(context) + "_sel";
+ String id = grid.getBaseClientId(context) + ":s";
return id;
}
@@ -225,7 +225,7 @@
string = "";
}
- String id = grid.getBaseClientId(context) + "_s";
+ String id = getSelectionInputName(context, grid);
ResponseWriter writer = context.getResponseWriter();
17 years, 7 months
JBoss Rich Faces SVN: r1078 - trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-07 10:14:31 -0400 (Thu, 07 Jun 2007)
New Revision: 1078
Modified:
trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/dragdrop.js
Log:
Prevent lower case when checking 'tagName' in JS.
Modified: trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/dragdrop.js
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/dragdrop.js 2007-06-07 14:06:39 UTC (rev 1077)
+++ trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/dragdrop.js 2007-06-07 14:14:31 UTC (rev 1078)
@@ -306,11 +306,12 @@
// abort on form elements, fixes a Firefox issue
var src = Event.element(event);
if(src.tagName && (
- src.tagName=='INPUT' ||
- src.tagName=='SELECT' ||
- src.tagName=='OPTION' ||
- src.tagName=='BUTTON' ||
- src.tagName=='TEXTAREA')) return;
+ src.tagName.toUpperCase() == 'INPUT' ||
+ src.tagName.toUpperCase() == 'SELECT' ||
+ src.tagName.toUpperCase() == 'OPTION' ||
+ src.tagName.toUpperCase() == 'BUTTON' ||
+ src.tagName.toUpperCase() == 'TEXTAREA'))
+ return;
var pointer = [Event.pointerX(event), Event.pointerY(event)];
var pos = Position.cumulativeOffset(this.element);
@@ -574,7 +575,7 @@
sortables: {},
_findRootElement: function(element) {
- while (element.tagName != "BODY") {
+ while (element.tagName.toUpperCase() != "BODY") {
if(element.id && Sortable.sortables[element.id]) return element;
element = element.parentNode;
}
17 years, 7 months