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) {