Author: alexsmirnov
Date: 2007-09-12 17:57:32 -0400 (Wed, 12 Sep 2007)
New Revision: 2918
Added:
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
Modified:
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
Log:
merge fixes for
http://jira.jboss.com/jira/browse/RF-894,
http://jira.jboss.com/jira/browse/RF-893 from trunk
Modified:
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
---
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-09-12
19:41:48 UTC (rev 2917)
+++
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-09-12
21:57:32 UTC (rev 2918)
@@ -38,12 +38,14 @@
import org.richfaces.renderkit.html.PanelMenuGroupRenderer;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconChevron;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronDown;
+import org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronLeft;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronUp;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconDisc;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconGrid;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconSpacer;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangle;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown;
+import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleLeft;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
@@ -115,12 +117,16 @@
source = getResource(PanelMenuIconSpacer.class.getName()).getUri(context, color);
} else if (iconType.equals("triangle")) {
source = getResource(PanelMenuIconTriangle.class.getName()).getUri(context, color);
+ } else if (iconType.equals("triangleLeft")) {
+ source = getResource(PanelMenuIconTriangleLeft.class.getName()).getUri(context,
color);
} else if (iconType.equals("triangleDown")) {
source = getResource(PanelMenuIconTriangleDown.class.getName()).getUri(context,
color);
} else if (iconType.equals("triangleUp")) {
source = getResource(PanelMenuIconTriangleUp.class.getName()).getUri(context,
color);
} else if (iconType.equals("chevron")) {
source = getResource(PanelMenuIconChevron.class.getName()).getUri(context, color);
+ } else if (iconType.equals("chevronLeft")) {
+ source = getResource(PanelMenuIconChevronLeft.class.getName()).getUri(context,
color);
} else if (iconType.equals("chevronUp")) {
source = getResource(PanelMenuIconChevronUp.class.getName()).getUri(context, color);
} else if (iconType.equals("chevronDown")) {
Modified:
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
===================================================================
---
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2007-09-12
19:41:48 UTC (rev 2917)
+++
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2007-09-12
21:57:32 UTC (rev 2918)
@@ -41,7 +41,11 @@
draw(path);
g2d.fill(path);
- g2d.translate(24,0);
+ if (this instanceof PanelMenuIconChevron ||
+ this instanceof PanelMenuIconChevronLeft)
+ g2d.translate(24, 0);
+ else
+ g2d.translate(0, 24);
g2d.fill(path);
AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128,
dimension.getHeight()/128);
Copied:
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
(from rev 2904,
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java)
===================================================================
---
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
(rev 0)
+++
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2007-09-12
21:57:32 UTC (rev 2918)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.geom.GeneralPath;
+
+public class PanelMenuIconChevronLeft extends PanelMenuIconChevronBasic {
+
+ void draw(GeneralPath path) {
+ path.moveTo(61,1);
+ path.lineTo(45,1);
+ path.lineTo(15,31);
+ path.lineTo(45,61);
+ path.lineTo(61,61);
+ path.lineTo(30,31);
+ path.closePath();
+ }
+
+}
Copied:
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
(from rev 2904,
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java)
===================================================================
---
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
(rev 0)
+++
tags/3.1.0/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2007-09-12
21:57:32 UTC (rev 2918)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+public class PanelMenuIconTriangleLeft extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47,30);
+ path.moveTo(33,0);
+ path.lineTo(0,33);
+ path.lineTo(0,34);
+ path.lineTo(33,67);
+ path.closePath();
+ }
+
+}