JBoss Rich Faces SVN: r21205 - in trunk/ui: output/ui/src/test/resources/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-25 09:10:52 -0500 (Tue, 25 Jan 2011)
New Revision: 21205
Modified:
trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml
Log:
https://issues.jboss.org/browse/RF-10158
Modified: trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
===================================================================
--- trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-25 13:39:43 UTC (rev 21204)
+++ trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-25 14:10:52 UTC (rev 21205)
@@ -1,7 +1,7 @@
package org.richfaces.renderkit.util;
public enum PanelIcons {
- none("rf-ico-none", null),
+ none("rf-ico-none", "rf-ico-none"),
chevron("rf-ico-chevron", "rf-ico-hdr-chevron"),
chevronLeft("rf-ico-chevron-left", "rf-ico-hdr-chevron-left"),
chevronUp("rf-ico-chevron-up", "rf-ico-hdr-chevron-up"),
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml 2011-01-25 13:39:43 UTC (rev 21204)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml 2011-01-25 14:10:52 UTC (rev 21205)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-ico-triangle"></div>
- <div class="rf-pm-ico-exp rf-ico-disc"></div>
+ <div class="rf-pm-ico-colps rf-ico-hdr-triangle"></div>
+ <div class="rf-pm-ico-exp rf-ico-hdr-disc"></div>
</td>
<td class="rf-pm-top-gr-lbl"></td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-ico-triangle"></div>
- <div class="rf-pm-ico-exp rf-ico-disc"></div>
+ <div class="rf-pm-ico-colps rf-ico-hdr-triangle"></div>
+ <div class="rf-pm-ico-exp rf-ico-hdr-disc"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml 2011-01-25 13:39:43 UTC (rev 21204)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml 2011-01-25 14:10:52 UTC (rev 21205)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-ico-chevron"></div>
- <div class="rf-pm-ico-exp rf-ico-chevron"></div>
+ <div class="rf-pm-ico-colps rf-ico-hdr-chevron"></div>
+ <div class="rf-pm-ico-exp rf-ico-hdr-chevron"></div>
</td>
<td class="rf-pm-top-gr-lbl"></td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-ico-chevron"></div>
- <div class="rf-pm-ico-exp rf-ico-chevron"></div>
+ <div class="rf-pm-ico-colps rf-ico-hdr-chevron"></div>
+ <div class="rf-pm-ico-exp rf-ico-hdr-chevron"></div>
</td>
</tr>
</tbody>
13 years, 11 months
JBoss Rich Faces SVN: r21204 - in trunk/ui: common/ui/src/main/java/org/richfaces/renderkit/html/iconimages and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-25 08:39:43 -0500 (Tue, 25 Jan 2011)
New Revision: 21204
Removed:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java
Modified:
trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java
trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss
trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
Log:
https://issues.jboss.org/browse/RF-10158
Modified: trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
===================================================================
--- trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -1,28 +1,38 @@
package org.richfaces.renderkit.util;
public enum PanelIcons {
- none("rf-ico-none"),
- disc("rf-ico-disc"),
- grid("rf-ico-grid"),
- chevron("rf-ico-chevron"),
- chevronUp("rf-ico-chevron-up"),
- chevronDown("rf-ico-chevron-down"),
- triangle("rf-ico-triangle"),
- triangleUp("rf-ico-triangle-up"),
- triangleDown("rf-ico-triangle-down");
+ none("rf-ico-none", null),
+ chevron("rf-ico-chevron", "rf-ico-hdr-chevron"),
+ chevronLeft("rf-ico-chevron-left", "rf-ico-hdr-chevron-left"),
+ chevronUp("rf-ico-chevron-up", "rf-ico-hdr-chevron-up"),
+ chevronDown("rf-ico-chevron-down", "rf-ico-hdr-chevron-down"),
+ disc("rf-ico-disc", "rf-ico-hdr-disc"),
+ grid("rf-ico-grid", "rf-ico-hdr-grid"),
+ transparent("rf-ico-transparent", "rf-ico-hdr-transparent"),
+ triangle("rf-ico-triangle", "rf-ico-hdr-triangle"),
+ triangleLeft("rf-ico-triangle-left", "rf-ico-hdr-triangle-left"),
+ triangleUp("rf-ico-triangle-up", "rf-ico-hdr-triangle-up"),
+ triangleDown("rf-ico-triangle-down", "rf-ico-hdr-triangle-down");
public static final PanelIcons DEFAULT = none;
private final String cssClass;
- private PanelIcons(String cssClass) {
+ private final String headerClass;
+
+ private PanelIcons(String cssClass, String headerClass) {
this.cssClass = cssClass;
+ this.headerClass = headerClass;
}
public String cssClass() {
return cssClass;
}
+ public String headerClass() {
+ return headerClass;
+ }
+
public static PanelIcons getIcon(String attrIconCollapsedValue) {
if (attrIconCollapsedValue == null) {
return null;
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -24,7 +24,6 @@
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -33,6 +32,7 @@
import org.richfaces.resource.AbstractJava2DUserResource;
import org.richfaces.resource.PostConstructResource;
+import org.richfaces.resource.ResourceParameter;
import org.richfaces.resource.StateHolderResource;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -46,6 +46,9 @@
private Color color;
+ @ResourceParameter(defaultValue = "false")
+ private boolean headerIcon;
+
protected PanelIconBasic() {
super(DIMENSION);
}
@@ -55,12 +58,6 @@
return;
}
- graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
paintImage(graphics2D, color);
}
@@ -74,8 +71,12 @@
public void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
- color = new Color(skin.getColorParameter(context, "tabDisabledTextColor"));
+ color = new Color(skin.getColorParameter(context, headerIcon ? Skin.HEADER_TEXT_COLOR : "tabDisabledTextColor"));
}
+
+ public void setHeaderIcon(boolean topIcon) {
+ this.headerIcon = topIcon;
+ }
public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
dataOutput.writeInt(color.getRGB());
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -21,14 +21,13 @@
package org.richfaces.renderkit.html.iconimages;
-import org.richfaces.resource.DynamicUserResource;
-
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.geom.Ellipse2D;
+import org.richfaces.resource.DynamicUserResource;
+
@DynamicUserResource
public class PanelIconDisc extends PanelIconBasic {
@@ -38,7 +37,6 @@
Dimension dimension = getDimension();
long dim = Math.round(dimension.getWidth() / 3);
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setColor(color);
g2d.translate(dim, dim);
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -21,29 +21,20 @@
package org.richfaces.renderkit.html.iconimages;
-import org.richfaces.resource.DynamicUserResource;
-
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.geom.Rectangle2D;
+import org.richfaces.resource.DynamicUserResource;
+
@DynamicUserResource
public class PanelIconGrid extends PanelIconBasic {
@Override
protected void paintImage(Graphics2D g2d, Color color) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
Rectangle2D.Float path = new Rectangle2D.Float();
Dimension dimension = getDimension();
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -1,35 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-
-@DynamicUserResource
-public class PanelIconSpacer extends PanelIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
- }
-
-}
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -23,7 +23,6 @@
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.geom.GeneralPath;
/**
@@ -33,10 +32,6 @@
protected void paintImage(Graphics2D g2d, Color color) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
-
GeneralPath path = new GeneralPath();
Dimension dimension = getDimension();
Modified: trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss
===================================================================
--- trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss 2011-01-25 13:39:43 UTC (rev 21204)
@@ -1,13 +1,95 @@
+.rf-ico-none,
+.rf-ico-chevron, .rf-ico-hdr-chevron,
+.rf-ico-chevron-down, .rf-ico-hdr-chevron-down,
+.rf-ico-chevron-left, .rf-ico-hdr-chevron-left,
+.rf-ico-chevron-up, .rf-ico-hdr-chevron-up,
+.rf-ico-disc, .rf-ico-hdr-disc,
+.rf-ico-grid, .rf-ico-hdr-grid,
+.rf-ico-transparent, .rf-ico-hdr-transparent,
+.rf-ico-triangle, .rf-ico-hdr-triangle,
+.rf-ico-triangle-down, .rf-ico-hdr-triangle-down,
+.rf-ico-triangle-left, .rf-ico-hdr-triangle-left,
+.rf-ico-triangle-up, .rf-ico-hdr-triangle-up {
+ width: 16px;
+ height: 16px;
+}
-.rf-ico-none { width: 16px; height: 16px; }
-.rf-ico-chevron { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Chevron.png']})" }
-.rf-ico-chevron-down { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronDown.png']})" }
-.rf-ico-chevron-left { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronLeft.png']})" }
-.rf-ico-chevron-up { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronUp.png']})" }
-.rf-ico-disc { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Disc.png']})" }
-.rf-ico-grid { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Grid.png']})" }
-.rf-ico-spacer { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Spacer.png']})" }
-.rf-ico-triangle { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Triangle.png']})" }
-.rf-ico-triangle-down { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleDown.png']})" }
-.rf-ico-triangle-left { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleLeft.png']})" }
-.rf-ico-triangle-up { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleUp.png']})" }
\ No newline at end of file
+.rf-ico-chevron {
+ background-image: "url(#{resource['org.richfaces.images:Chevron.png']})"
+}
+
+.rf-ico-hdr-chevron {
+ background-image: "url(#{resource['org.richfaces.images:HeaderChevron.png']})"
+}
+
+.rf-ico-chevron-down {
+ background-image: "url(#{resource['org.richfaces.images:ChevronDown.png']})"
+}
+
+.rf-ico-hdr-chevron-down {
+ background-image: "url(#{resource['org.richfaces.images:HeaderChevronDown.png']})"
+}
+
+.rf-ico-chevron-left {
+ background-image: "url(#{resource['org.richfaces.images:ChevronLeft.png']})"
+}
+
+.rf-ico-hdr-chevron-left {
+ background-image: "url(#{resource['org.richfaces.images:HeaderChevronLeft.png']})"
+}
+
+.rf-ico-chevron-up {
+ background-image: "url(#{resource['org.richfaces.images:ChevronUp.png']})"
+}
+
+.rf-ico-hdr-chevron-up {
+ background-image: "url(#{resource['org.richfaces.images:HeaderChevronUp.png']})"
+}
+
+.rf-ico-disc {
+ background-image: "url(#{resource['org.richfaces.images:Disc.png']})"
+}
+
+.rf-ico-hdr-disc {
+ background-image: "url(#{resource['org.richfaces.images:HeaderDisc.png']})"
+}
+
+.rf-ico-grid {
+ background-image: "url(#{resource['org.richfaces.images:Grid.png']})"
+}
+
+.rf-ico-hdr-grid {
+ background-image: "url(#{resource['org.richfaces.images:HeaderGrid.png']})"
+}
+
+.rf-ico-triangle {
+ background-image: "url(#{resource['org.richfaces.images:Triangle.png']})"
+}
+
+.rf-ico-hdr-triangle {
+ background-image: "url(#{resource['org.richfaces.images:HeaderTriangle.png']})"
+}
+
+.rf-ico-triangle-down {
+ background-image: "url(#{resource['org.richfaces.images:TriangleDown.png']})"
+}
+
+.rf-ico-hdr-triangle-down {
+ background-image: "url(#{resource['org.richfaces.images:HeaderTriangleDown.png']})"
+}
+
+.rf-ico-triangle-left {
+ background-image: "url(#{resource['org.richfaces.images:TriangleLeft.png']})"
+}
+
+.rf-ico-hdr-triangle-left {
+ background-image: "url(#{resource['org.richfaces.images:HeaderTriangleLeft.png']})"
+}
+
+.rf-ico-triangle-up {
+ background-image: "url(#{resource['org.richfaces.images:TriangleUp.png']})"
+}
+
+.rf-ico-hdr-triangle-up {
+ background-image: "url(#{resource['org.richfaces.images:HeaderTriangleUp.png']})"
+}
\ No newline at end of file
Modified: trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 13:39:43 UTC (rev 21204)
@@ -1,21 +1,29 @@
org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron
+org.richfaces.images\:HeaderChevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron{headerIcon=true}
org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown
+org.richfaces.images\:HeaderChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown{headerIcon=true}
org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft
+org.richfaces.images\:HeaderChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft{headerIcon=true}
org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp
+org.richfaces.images\:HeaderChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp{headerIcon=true}
org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc
+org.richfaces.images\:HeaderDisc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc{headerIcon=true}
org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid
+org.richfaces.images\:HeaderGrid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid{headerIcon=true}
-org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelIconSpacer
-
org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle
+org.richfaces.images\:HeaderTriangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle{headerIcon=true}
org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown
+org.richfaces.images\:HeaderTriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown{headerIcon=true}
org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft
+org.richfaces.images\:HeaderTriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft{headerIcon=true}
-org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp
\ No newline at end of file
+org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp
+org.richfaces.images\:HeaderTriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp{headerIcon=true}
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -24,7 +24,7 @@
String iconInactive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconInactive();
String iconActive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconActive();
- encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconInactive, iconActive);
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconInactive, iconActive, true);
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractAccordionItem panel) throws IOException {
@@ -32,16 +32,16 @@
String iconActive = panel.isDisabled() ? panel.getRightIconDisabled() : panel.getRightIconActive();
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconInactive, iconActive);
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconInactive, iconActive, true);
}
@Override
- protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue, boolean header) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
- encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-act");
- encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-inact");
+ encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-act", header);
+ encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-inact", header);
writer.endElement(TD_ELEM);
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -68,13 +68,13 @@
protected void encodeHeaderLeftIcon(ResponseWriter writer, FacesContext context, AbstractCollapsiblePanel panel) throws IOException {
encodeTdIcon(writer, context, cssClassPrefix + "-ico",
- panel.getLeftIconCollapsed(), panel.getLeftIconExpanded());
+ panel.getLeftIconCollapsed(), panel.getLeftIconExpanded(), true);
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractCollapsiblePanel panel) throws IOException {
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico",
- panel.getRightIconCollapsed(), panel.getRightIconExpanded());
+ panel.getRightIconCollapsed(), panel.getRightIconExpanded(), true);
}
@Override
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -1,11 +1,12 @@
package org.richfaces.renderkit.html;
-import org.richfaces.component.AbstractPanelMenuGroup;
+import java.io.IOException;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import java.io.IOException;
+import org.richfaces.component.AbstractPanelMenuGroup;
+
class PanelMenuGroupHeaderRenderer extends TableIconsRendererHelper<AbstractPanelMenuGroup> {
PanelMenuGroupHeaderRenderer(String cssClassPrefix) {
@@ -16,7 +17,7 @@
String iconCollapsed = group.isDisabled() ? group.getLeftIconDisabled() : group.getLeftIconCollapsed();
String iconExpanded = group.isDisabled() ? group.getLeftIconDisabled() : group.getLeftIconExpanded();
- encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconCollapsed, iconExpanded);
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconCollapsed, iconExpanded, group.isTopItem());
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuGroup group) throws IOException {
@@ -24,6 +25,6 @@
String iconExpanded = group.isDisabled() ? group.getRightIconDisabled() : group.getRightIconExpanded();
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconCollapsed, iconExpanded);
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconCollapsed, iconExpanded, group.isTopItem());
}
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-25 13:39:43 UTC (rev 21204)
@@ -1,15 +1,24 @@
package org.richfaces.renderkit.html;
-import org.richfaces.renderkit.RenderKitUtils;
-import org.richfaces.renderkit.util.PanelIcons;
+import static org.richfaces.component.util.HtmlUtil.concatClasses;
+import static org.richfaces.renderkit.HtmlConstants.ALT_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
+import static org.richfaces.renderkit.HtmlConstants.IMG_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.SRC_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.TABLE_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.TBODY_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.TD_ELEM;
+import static org.richfaces.renderkit.HtmlConstants.TR_ELEMENT;
+import java.io.IOException;
+
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import static org.richfaces.component.util.HtmlUtil.concatClasses;
-import static org.richfaces.renderkit.HtmlConstants.*;
+import org.richfaces.renderkit.RenderKitUtils;
+import org.richfaces.renderkit.util.PanelIcons;
public abstract class TableIconsRendererHelper<T extends UIComponent> {
@@ -74,32 +83,32 @@
protected abstract void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, T menuItem) throws IOException;
- protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue, boolean header) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
- encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-colps");
- encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-exp");
+ encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-colps", header);
+ encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-exp", header);
writer.endElement(TD_ELEM);
}
- protected void encodeIdIcon(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass) throws IOException {
+ protected void encodeIdIcon(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass, boolean header) throws IOException {
if (attrIconValue == null || attrIconValue.trim().length() <= 0) {
- encodeDivIcon(writer, PanelIcons.none, styleClass);
+ encodeDivIcon(writer, PanelIcons.none, styleClass, header);
} else {
PanelIcons icon = PanelIcons.getIcon(attrIconValue);
if (icon != null) {
- encodeDivIcon(writer, icon, styleClass);
+ encodeDivIcon(writer, icon, styleClass, header);
} else {
encodeImage(writer, context, attrIconValue);
}
}
}
- public static void encodeDivIcon(ResponseWriter writer, PanelIcons icon, String styleClass) throws IOException {
+ public static void encodeDivIcon(ResponseWriter writer, PanelIcons icon, String styleClass, boolean header) throws IOException {
writer.startElement(DIV_ELEM, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, icon.cssClass()), null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, header ? icon.headerClass() : icon.cssClass()), null);
writer.endElement(DIV_ELEM);
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-01-25 13:38:22 UTC (rev 21203)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-01-25 13:39:43 UTC (rev 21204)
@@ -180,7 +180,6 @@
border-width: 1px;
border-style: solid;
border-color: '#{richSkin.panelBorderColor}';
- margin-bottom: 3px
}
.rf-pm-top-gr-hov {
13 years, 11 months
JBoss Rich Faces SVN: r21203 - in trunk/examples/richfaces-showcase/src/main: webapp/richfaces/dataTable/samples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-01-25 08:38:22 -0500 (Tue, 25 Jan 2011)
New Revision: 21203
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml
Log:
dataTable edit example
Modified: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-01-25 13:19:30 UTC (rev 21202)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-01-25 13:38:22 UTC (rev 21203)
@@ -180,7 +180,7 @@
ii.setVendor(vendor);
ii.setModel(model);
ii.setStock(RandomHelper.randomstring(6, 7));
- ii.setVin(RandomHelper.randomstring(14, 15));
+ ii.setVin(RandomHelper.randomstring(17, 17));
ii.setMileage(new BigDecimal(RandomHelper.rand(5000, 80000)).setScale(DECIMALS, ROUNDING_MODE));
ii.setMileageMarket(new BigDecimal(RandomHelper.rand(25000, 45000)).setScale(DECIMALS, ROUNDING_MODE));
ii.setPrice(new Integer(RandomHelper.rand(15000, 55000)));
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml 2011-01-25 13:19:30 UTC (rev 21202)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml 2011-01-25 13:38:22 UTC (rev 21203)
@@ -60,7 +60,7 @@
</a4j:commandLink>
</rich:column>
<f:facet name="footer">
- <rich:dataScroller page="#{carsBean.page}"/>
+ <rich:dataScroller page="#{carsBean.page}" />
</f:facet>
</rich:dataTable>
@@ -83,6 +83,9 @@
<rich:popupPanel header="Edit Car Details" id="editPane">
<h:form>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages />
+ </a4j:outputPanel>
<h:panelGrid columns="3" id="editGrid">
<h:outputText value="Vendor" />
<h:outputText value="#{carsBean.editedCar.vendor}" />
@@ -91,19 +94,27 @@
<h:outputText value="#{carsBean.editedCar.model}" />
<h:panelGroup />
<h:outputText value="Price" />
- <h:inputText value="#{carsBean.editedCar.price}" id="price" />
+ <h:inputText value="#{carsBean.editedCar.price}" required="true"
+ requiredMessage="Price is required" id="price"
+ validatorMessage="Should be a valid price" label="Price field" />
<rich:message for="price" />
<h:outputText value="Mileage" />
- <h:inputText value="#{carsBean.editedCar.mileage}" id="mage" />
+ <h:inputText value="#{carsBean.editedCar.mileage}" id="mage"
+ validatorMessage="Should be a valid mileage" label="Mileage field" />
<rich:message for="mage" />
<h:outputText value="VIN" />
- <h:inputText value="#{carsBean.editedCar.vin}" id="vin" />
+ <h:inputText value="#{carsBean.editedCar.vin}" id="vin"
+ required="true" validatorMessage="Not a valid 17-digit VIN"
+ requiredMessage="VIN is required">
+ <f:validateLength minimum="17" maximum="17" />
+ </h:inputText>
<rich:message for="vin" />
</h:panelGrid>
- <a4j:commandButton value="Store" action="#{carsBean.store}"
+ <a4j:commandButton value="Store" action="#{carsBean.store}"
render="table" execute="@form"
- oncomplete="#{rich:component('editPane')}.hide();" />
- <a4j:commandButton value="Cancel" onclick="#{rich:component('editPane')}.hide(); return false;"/>
+ oncomplete="if (#{facesContext.maximumSeverity==null}) {#{rich:component('editPane')}.hide();}" />
+ <a4j:commandButton value="Cancel"
+ onclick="#{rich:component('editPane')}.hide(); return false;" />
</h:form>
</rich:popupPanel>
</ui:composition>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21202 - in trunk/ui/input/ui/src: main/java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-25 08:19:30 -0500 (Tue, 25 Jan 2011)
New Revision: 21202
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java
trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml
trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestDefault.xmlunit.xml
trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestEdit.xmlunit.xml
trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestWithControls.xmlunit.xml
Log:
RF-9846 Inplace select generates not valid markup
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2011-01-25 13:19:30 UTC (rev 21202)
@@ -55,16 +55,16 @@
@Attribute(defaultValue="true")
public abstract boolean isSaveOnBlur();
- @Attribute()
+ @Attribute
public abstract InplaceState getState();
- @Attribute()
+ @Attribute
public abstract String getEditEvent();
- @Attribute()
+ @Attribute
public abstract boolean isShowControls();
- @Attribute()
+ @Attribute
public abstract String getInputWidth();
@Attribute
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java 2011-01-25 13:19:30 UTC (rev 21202)
@@ -47,7 +47,10 @@
public static final String COMPONENT_FAMILY = "org.richfaces.Select";
- @Attribute()
+ @Attribute
+ public abstract String getInputWidth();
+
+ @Attribute
public abstract InplaceState getState();
@Attribute
@@ -62,7 +65,7 @@
@Attribute(defaultValue="true")
public abstract boolean isSaveOnBlur();
- @Attribute()
+ @Attribute
public abstract boolean isShowControls();
@Attribute
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2011-01-25 13:19:30 UTC (rev 21202)
@@ -33,6 +33,7 @@
import org.richfaces.component.AbstractInplaceInput;
import org.richfaces.component.InplaceComponent;
import org.richfaces.component.InplaceState;
+import org.richfaces.renderkit.util.HtmlDimensions;
/**
* @author Anton Belevich
@@ -207,7 +208,7 @@
if (value == null || "".equals(value)) {
value = "100%";
}
- return value;
+ return HtmlDimensions.formatSize(value);
}
protected String getEditEvent(UIComponent component) {
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java 2011-01-25 13:19:30 UTC (rev 21202)
@@ -160,4 +160,13 @@
css = (css != null) ? concatClasses("rf-is-lst-cord", css) : "rf-is-lst-cord";
return css;
}
+
+ protected String getInputWidthStyle(UIComponent component) {
+ String value = ((AbstractInplaceSelect) component).getInputWidth();
+ if (value == null || "".equals(value)) {
+ return "";
+ } else {
+ return "width: "+HtmlDimensions.formatSize(value)+";";
+ }
+ }
}
Modified: trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2011-01-25 13:19:30 UTC (rev 21202)
@@ -50,7 +50,7 @@
<input id="#{clientId}selValue" name="#{clientId}" type="hidden" value="#{getInputValue(facesContext, component)}"/>
<input id="#{clientId}Input" name="#{clientId}Input" autocomplete="off"
type="text" value="#{getSelectInputLabel(facesContext, component)}"
- class="rf-is-fld" style="width: #{component.attributes['inputWidth']};" readonly="readonly"
+ class="rf-is-fld" style="#{getInputWidthStyle(component)}" readonly="readonly"
cdk:passThrough="tabindex">
<cdk:call expression="renderInputHandlers(facesContext, component);" />
</input>
Modified: trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestDefault.xmlunit.xml
===================================================================
--- trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestDefault.xmlunit.xml 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestDefault.xmlunit.xml 2011-01-25 13:19:30 UTC (rev 21202)
@@ -3,7 +3,7 @@
<input class="rf-is-none" id="form:inplaceSelectDefaultFocus" name="form:inplaceSelectDefaultFocus" style="position: absolute; top: 0px; left: 0px; outline-style: none;" type="image" />
<span class="rf-is-edit rf-is-none" id="form:inplaceSelectDefaultEdit">
<input id="form:inplaceSelectDefaultselValue" name="form:inplaceSelectDefault" type="hidden" />
- <input autocomplete="off" class="rf-is-fld" id="form:inplaceSelectDefaultInput" name="form:inplaceSelectDefaultInput" readonly="readonly" style="width: ;" type="text" />
+ <input autocomplete="off" class="rf-is-fld" id="form:inplaceSelectDefaultInput" name="form:inplaceSelectDefaultInput" readonly="readonly" type="text" />
<span class="rf-is-lst-cord" id="form:inplaceSelectDefaultList" style="display: none">
<span class="rf-is-lst-pos" style="width: 200px">
<span class="rf-is-shdw">
Modified: trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestEdit.xmlunit.xml
===================================================================
--- trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestEdit.xmlunit.xml 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestEdit.xmlunit.xml 2011-01-25 13:19:30 UTC (rev 21202)
@@ -3,7 +3,7 @@
<input class="rf-is-none" id="form:inplaceSelectEditFocus" name="form:inplaceSelectEditFocus" style="position: absolute; top: 0px; left: 0px; outline-style: none;" type="image" />
<span class="rf-is-edit" id="form:inplaceSelectEditEdit">
<input id="form:inplaceSelectEditselValue" name="form:inplaceSelectEdit" type="hidden" />
- <input autocomplete="off" class="rf-is-fld" id="form:inplaceSelectEditInput" name="form:inplaceSelectEditInput" readonly="readonly" style="width: ;" type="text" />
+ <input autocomplete="off" class="rf-is-fld" id="form:inplaceSelectEditInput" name="form:inplaceSelectEditInput" readonly="readonly" type="text" />
<span class="rf-is-btn-prepos">
<span class="rf-is-btn-pos">
<span class="rf-is-shdw" id="form:inplaceSelectEditBtnshadow">
Modified: trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestWithControls.xmlunit.xml
===================================================================
--- trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestWithControls.xmlunit.xml 2011-01-25 13:01:38 UTC (rev 21201)
+++ trunk/ui/input/ui/src/test/resources/org/richfaces/renderkit/inplaceSelectTestWithControls.xmlunit.xml 2011-01-25 13:19:30 UTC (rev 21202)
@@ -3,7 +3,7 @@
<input class="rf-is-none" id="form:inplaceSelectWithControlsFocus" name="form:inplaceSelectWithControlsFocus" style="position: absolute; top: 0px; left: 0px; outline-style: none;" type="image" />
<span class="rf-is-edit rf-is-none" id="form:inplaceSelectWithControlsEdit">
<input id="form:inplaceSelectWithControlsselValue" name="form:inplaceSelectWithControls" type="hidden" />
- <input autocomplete="off" class="rf-is-fld" id="form:inplaceSelectWithControlsInput" name="form:inplaceSelectWithControlsInput" readonly="readonly" style="width: ;" type="text" />
+ <input autocomplete="off" class="rf-is-fld" id="form:inplaceSelectWithControlsInput" name="form:inplaceSelectWithControlsInput" readonly="readonly" type="text" />
<span class="rf-is-btn-prepos">
<span class="rf-is-btn-pos">
<span class="rf-is-shdw" id="form:inplaceSelectWithControlsBtnshadow">
13 years, 11 months
JBoss Rich Faces SVN: r21201 - in trunk/examples/richfaces-showcase/src/main: webapp/richfaces/dataTable/samples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-01-25 08:01:38 -0500 (Tue, 25 Jan 2011)
New Revision: 21201
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml
Log:
dataTable edit example
Modified: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-01-25 13:00:20 UTC (rev 21200)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-01-25 13:01:38 UTC (rev 21201)
@@ -32,12 +32,18 @@
private static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
private List<InventoryItem> allInventoryItems = null;
private List<InventoryVendorList> inventoryVendorLists = null;
- private InventoryItem currentCar;
+ private int currentCarIndex;
+ private InventoryItem editedCar;
+ private int page;
public void remove() {
- allInventoryItems.remove(currentCar);
+ allInventoryItems.remove(allInventoryItems.get(currentCarIndex));
}
-
+
+ public void store() {
+ allInventoryItems.set(currentCarIndex, editedCar);
+ }
+
public List<SelectItem> getVendorOptions() {
List<SelectItem> result = new ArrayList<SelectItem>();
result.add(new SelectItem("", ""));
@@ -197,12 +203,27 @@
return iiList;
}
- public InventoryItem getCurrentCar() {
- return currentCar;
+ public int getCurrentCarIndex() {
+ return currentCarIndex;
}
- public void setCurrentCar(InventoryItem currentCar) {
- this.currentCar = currentCar;
+ public void setCurrentCarIndex(int currentCarIndex) {
+ this.currentCarIndex = currentCarIndex;
}
+ public InventoryItem getEditedCar() {
+ return editedCar;
+ }
+
+ public void setEditedCar(InventoryItem editedCar) {
+ this.editedCar = editedCar;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(int page) {
+ this.page = page;
+ }
}
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml 2011-01-25 13:00:20 UTC (rev 21200)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml 2011-01-25 13:01:38 UTC (rev 21201)
@@ -5,13 +5,25 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
+
+ <style>
+a.no-decor>img {
+ border: none;
+}
+</style>
+ <a4j:status onstart="#{rich:component('statPane')}.show()"
+ onstop="#{rich:component('statPane')}.hide()" />
<h:form id="form">
<rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
- id="table" rows="15">
+ iterationStatusVar="it" id="table" rows="15">
<f:facet name="noData">
Nothing found
</f:facet>
<rich:column>
+ <f:facet name="header">#</f:facet>
+ #{it.index}
+ </rich:column>
+ <rich:column>
<f:facet name="header">Vendor</f:facet>
<h:outputText value="#{car.vendor}" />
</rich:column>
@@ -32,47 +44,66 @@
<h:outputText value="#{car.vin}" />
</rich:column>
<rich:column>
- <f:facet name="header">Actions</f:facet>
- <h:commandLink action="#{carsBean.remove}">
- <h:graphicImage value="/images/icons/delete.gif"/>
- <a4j:ajax render="table" execute="@this" />
- <f:setPropertyActionListener target="#{carsBean.currentCar}"
+ <a4j:commandLink styleClass="no-decor" execute="@this"
+ render="@none" oncomplete="#{rich:component('confirmPane')}.show()">
+ <h:graphicImage value="/images/icons/delete.gif" />
+ <a4j:param value="#{it.index}"
+ assignTo="#{carsBean.currentCarIndex}" />
+ </a4j:commandLink>
+ <a4j:commandLink styleClass="no-decor" render="editGrid"
+ execute="@this" oncomplete="#{rich:component('editPane')}.show()">
+ <h:graphicImage value="/images/icons/edit.gif" />
+ <a4j:param value="#{it.index}"
+ assignTo="#{carsBean.currentCarIndex}" />
+ <f:setPropertyActionListener target="#{carsBean.editedCar}"
value="#{car}" />
- </h:commandLink>
- <h:commandLink>
- <h:graphicImage value="/images/icons/edit.gif"/>
- <a4j:ajax render="edit" execute="@this"
- oncomplete="#{rich:component('editPane')}.show()" />
- <f:setPropertyActionListener target="#{carsBean.currentCar}"
- value="#{car}" />
- </h:commandLink>
+ </a4j:commandLink>
</rich:column>
<f:facet name="footer">
- <rich:dataScroller/>
+ <rich:dataScroller page="#{carsBean.page}"/>
</f:facet>
</rich:dataTable>
+
+ <a4j:jsFunction name="remove" action="#{carsBean.remove}"
+ render="table" execute="@this"
+ oncomplete="#{rich:component('confirmPane')}.hide();" />
</h:form>
+
+ <rich:popupPanel id="statPane" autosized="true">
+ <h:graphicImage value="/images/ai.gif" />
+ Wait please...
+ </rich:popupPanel>
+
+ <rich:popupPanel id="confirmPane" autosized="true">
+ Sure to delete row?
+ <a4j:commandButton value="Cancel"
+ onclick="#{rich:component('confirmPane')}.hide(); return false;" />
+ <a4j:commandButton value="Delete" onclick="remove(); return false;" />
+ </rich:popupPanel>
+
<rich:popupPanel header="Edit Car Details" id="editPane">
<h:form>
- <h:panelGrid columns="3">
- <h:outputText value="Vendor" />
- <h:outputText value="#{carsBean.currentCar.vendor}" />
- <h:panelGroup />
- <h:outputText value="Model" />
- <h:outputText value="#{carsBean.currentCar.model}" />
- <h:panelGroup />
- <h:outputText value="Price" />
- <h:inputText value="#{carsBean.currentCar.price}" id="price" />
- <rich:message for="price" />
- <h:outputText value="Mileage" />
- <h:inputText value="#{carsBean.currentCar.mileage}" id="mage" />
- <rich:message for="mage" />
- <h:outputText value="VIN" />
- <h:inputText value="#{carsBean.currentCar.vin}" id="vin" />
- <rich:message for="vin" />
- </h:panelGrid>
- <a4j:commandButton value="Store"/>
- <a4j:commandButton value="Cancel" onclick="#{rich:component('editPane')}.hide(); return false;"/>
+ <h:panelGrid columns="3" id="editGrid">
+ <h:outputText value="Vendor" />
+ <h:outputText value="#{carsBean.editedCar.vendor}" />
+ <h:panelGroup />
+ <h:outputText value="Model" />
+ <h:outputText value="#{carsBean.editedCar.model}" />
+ <h:panelGroup />
+ <h:outputText value="Price" />
+ <h:inputText value="#{carsBean.editedCar.price}" id="price" />
+ <rich:message for="price" />
+ <h:outputText value="Mileage" />
+ <h:inputText value="#{carsBean.editedCar.mileage}" id="mage" />
+ <rich:message for="mage" />
+ <h:outputText value="VIN" />
+ <h:inputText value="#{carsBean.editedCar.vin}" id="vin" />
+ <rich:message for="vin" />
+ </h:panelGrid>
+ <a4j:commandButton value="Store" action="#{carsBean.store}"
+ render="table" execute="@form"
+ oncomplete="#{rich:component('editPane')}.hide();" />
+ <a4j:commandButton value="Cancel" onclick="#{rich:component('editPane')}.hide(); return false;"/>
</h:form>
</rich:popupPanel>
</ui:composition>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21200 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-25 08:00:20 -0500 (Tue, 25 Jan 2011)
New Revision: 21200
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
Log:
* 2 tests for toggle panel fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-01-25 12:38:35 UTC (rev 21199)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-01-25 13:00:20 UTC (rev 21200)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -136,18 +136,18 @@
guardHttp(selenium).click(tc3);
assertTrue(selenium.isVisible(item3), "Item 3 should be visible.");
- assertFalse(selenium.isElementPresent(item1), "Item 1 should not be present.");
- assertFalse(selenium.isElementPresent(item2), "Item 2 should not be present.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
guardHttp(selenium).click(tc2);
assertTrue(selenium.isVisible(item2), "Item 2 should be visible.");
- assertFalse(selenium.isElementPresent(item1), "Item 1 should not be present.");
- assertFalse(selenium.isElementPresent(item3), "Item 3 should not be present.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
guardHttp(selenium).click(tc1);
assertTrue(selenium.isVisible(item1), "Item 1 should be visible.");
- assertFalse(selenium.isElementPresent(item2), "Item 2 should not be present.");
- assertFalse(selenium.isElementPresent(item3), "Item 3 should not be present.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
}
@Test
@@ -215,23 +215,23 @@
guardHttp(selenium).click(tcNext);
assertTrue(selenium.isVisible(item2), "Next item (2) should be visible.");
- assertFalse(selenium.isElementPresent(item1), "Item 1 should not be present.");
- assertFalse(selenium.isElementPresent(item3), "Item 3 should not be present.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
guardHttp(selenium).click(tcPrev);
assertTrue(selenium.isVisible(item1), "Previous item (2) should be visible.");
- assertFalse(selenium.isElementPresent(item2), "Item 2 should not be present.");
- assertFalse(selenium.isElementPresent(item3), "Item 3 should not be present.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
guardHttp(selenium).click(tcLast);
assertTrue(selenium.isVisible(item3), "Last item (3) should be visible.");
- assertFalse(selenium.isElementPresent(item1), "Item 1 should not be present.");
- assertFalse(selenium.isElementPresent(item2), "Item 2 should not be present.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
guardHttp(selenium).click(tcFirst);
assertTrue(selenium.isVisible(item1), "First item (1) should be visible.");
- assertFalse(selenium.isElementPresent(item2), "Item 2 should not be present.");
- assertFalse(selenium.isElementPresent(item3), "Item 3 should not be present.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
}
@Test
13 years, 11 months
JBoss Rich Faces SVN: r21199 - modules/tests/metamer/trunk/application/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-25 07:38:35 -0500 (Tue, 25 Jan 2011)
New Revision: 21199
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
Log:
* main template refactored
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2011-01-25 12:33:16 UTC (rev 21198)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2011-01-25 12:38:35 UTC (rev 21199)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -60,9 +60,13 @@
</c:when>
<c:otherwise>
+ <h:form id="beforeForm">
+ <div style="margin-bottom: 20px;"><ui:insert name="outOfTemplateBefore" /></div>
+ </h:form>
<h:form id="form">
- <div style="margin-bottom: 20px;"><ui:insert name="outOfTemplateBefore" /></div>
<ui:decorate template="/templates/#{templateBean.firstTemplate}.xhtml" />
+ </h:form>
+ <h:form id="afterForm">
<div style="margin-top: 20px;"><ui:insert name="outOfTemplateAfter" /></div>
</h:form>
</c:otherwise>
13 years, 11 months
JBoss Rich Faces SVN: r21198 - in trunk/ui/output/ui/src/main: resources/META-INF/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-25 07:33:16 -0500 (Tue, 25 Jan 2011)
New Revision: 21198
Removed:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Log:
Panel menu icons refactoring
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,88 +0,0 @@
-/**
- * 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.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.AbstractJava2DUserResource;
-import org.richfaces.resource.PostConstructResource;
-import org.richfaces.resource.StateHolderResource;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
-/**
- * @author Alex.Kolonitsky
- */
-public abstract class PanelIconBasic extends AbstractJava2DUserResource implements StateHolderResource {
-
- private static final Dimension DIMENSION = new Dimension(16, 16);
-
- private Color color;
-
- protected PanelIconBasic() {
- super(DIMENSION);
- }
-
- public void paint(Graphics2D graphics2D) {
- if (color == null || graphics2D == null) {
- return;
- }
-
- graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- paintImage(graphics2D, color);
- }
-
- protected abstract void paintImage(Graphics2D g2d, Color color);
-
- public boolean isTransient() {
- return false;
- }
-
- @PostConstructResource
- public void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
- color = new Color(skin.getColorParameter(context, "tabDisabledTextColor"));
- }
-
- public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- dataOutput.writeInt(color.getRGB());
- }
-
- public void readState(FacesContext context, DataInput dataInput) throws IOException {
- color = new Color(dataInput.readInt());
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconChevron extends PanelIconChevronBasic {
-
- protected void draw(GeneralPath path) {
- path.moveTo(1, 1);
-
- path.lineTo(17, 1);
- path.lineTo(47, 31);
- path.lineTo(17, 61);
- path.lineTo(1, 61);
- path.lineTo(31, 31);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,79 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-
-/**
- * @author Alex.Kolonitsky
- */
-public abstract class PanelIconChevronBasic extends PanelIconBasic {
- private static final int BUFFER_IMAGE_SIZE = 128;
-
- @Override
- protected void paintImage(Graphics2D graphics2d, Color color) {
-
- BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE, BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimension();
- g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
- g2d.translate(28, 28);
- g2d.setColor(color);
-
- GeneralPath path = new GeneralPath();
- draw(path);
-
- g2d.fill(path);
- if (this instanceof PanelIconChevron
- || this instanceof PanelIconChevronLeft) {
- g2d.translate(24, 0);
- } else {
- g2d.translate(0, 24);
- }
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE, dimension.getHeight() / BUFFER_IMAGE_SIZE);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
- g2d.dispose();
- }
-
- abstract void draw(GeneralPath draw);
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconChevronDown extends PanelIconChevronBasic {
-
- protected void draw(GeneralPath path) {
-
- path.moveTo(1, 0);
- path.lineTo(31, 30);
- path.lineTo(61, 0);
- path.lineTo(61, 16);
- path.lineTo(31, 46);
- path.lineTo(1, 16);
- path.closePath();
-
- }
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconChevronLeft extends PanelIconChevronBasic {
-
- 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();
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,43 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconChevronUp extends PanelIconChevronBasic {
-
- protected void draw(GeneralPath path) {
-
- path.moveTo(0, 46);
- path.lineTo(0, 31);
- path.lineTo(30, 1);
- path.lineTo(61, 31);
- path.lineTo(61, 46);
- path.lineTo(30, 16);
- path.closePath();
-
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,48 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Ellipse2D;
-
-@DynamicUserResource
-public class PanelIconDisc extends PanelIconBasic {
-
- @Override
- protected void paintImage(Graphics2D g2d, Color color) {
-
- Dimension dimension = getDimension();
- long dim = Math.round(dimension.getWidth() / 3);
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(color);
- g2d.translate(dim, dim);
-
- g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,67 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Rectangle2D;
-
-@DynamicUserResource
-public class PanelIconGrid extends PanelIconBasic {
-
- @Override
- protected void paintImage(Graphics2D g2d, Color color) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Rectangle2D.Float path = new Rectangle2D.Float();
- Dimension dimension = getDimension();
-
- g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
- g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
- g2d.translate(40, 40);
-
- path.setRect(0, 0, 40, 40);
-
- g2d.setColor(color);
-
- Color bcolor = new Color(1f, 1f, 1f, 0f);
-
- g2d.setBackground(bcolor);
- g2d.fill(path);
- g2d.clearRect(16, 0, 8, 40);
- g2d.clearRect(0, 16, 40, 8);
-
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,35 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-
-@DynamicUserResource
-public class PanelIconSpacer extends PanelIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.*;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconTriangle extends PanelIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(47, 30);
- path.moveTo(0, 0);
- path.lineTo(33, 33);
- path.lineTo(33, 34);
- path.lineTo(0, 67);
- path.closePath();
-
- }
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,54 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.GeneralPath;
-
-/**
- * @author Anton Belevich
- */
-public abstract class PanelIconTriangleBasic extends PanelIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
-
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimension();
- g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
-
- draw(path, g2d);
-
- g2d.setColor(color);
- g2d.fill(path);
-
- }
-
- abstract void draw(GeneralPath path, Graphics2D g2d);
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,44 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconTriangleDown extends PanelIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
-
- g2d.translate(31, 54);
-
- path.moveTo(0, 0);
- path.lineTo(33, 33);
- path.lineTo(34, 33);
- path.lineTo(67, 0);
- path.closePath();
-
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconTriangleLeft extends PanelIconTriangleBasic {
-
- 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();
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java 2011-01-25 12:33:16 UTC (rev 21198)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelIconTriangleUp extends PanelIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(31, 47);
-
- path.moveTo(0, 33);
- path.lineTo(33, 0);
- path.lineTo(34, 0);
- path.lineTo(67, 33);
- path.closePath();
- }
-
-}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 12:31:56 UTC (rev 21197)
+++ trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 12:33:16 UTC (rev 21198)
@@ -18,28 +18,6 @@
org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
-org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron
-
-org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown
-
-org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft
-
-org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp
-
-org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc
-
-org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid
-
-org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelIconSpacer
-
-org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle
-
-org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown
-
-org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft
-
-org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp
-
org.richfaces.images\:menu_list_bg.gif=org.richfaces.renderkit.html.BaseGradient\
{width=22, height=3, baseColorParam=additionalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
org.richfaces.images\:menu_item_bg.gif=org.richfaces.renderkit.html.BaseGradient\
13 years, 11 months
JBoss Rich Faces SVN: r21197 - in trunk/ui/common/ui/src/main: java/org/richfaces/renderkit/html and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-25 07:31:56 -0500 (Tue, 25 Jan 2011)
New Revision: 21197
Added:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java
trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Removed:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
Log:
Panel menu icons refactoring
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages)
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,88 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.resource.AbstractJava2DUserResource;
+import org.richfaces.resource.PostConstructResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelIconBasic extends AbstractJava2DUserResource implements StateHolderResource {
+
+ private static final Dimension DIMENSION = new Dimension(16, 16);
+
+ private Color color;
+
+ protected PanelIconBasic() {
+ super(DIMENSION);
+ }
+
+ public void paint(Graphics2D graphics2D) {
+ if (color == null || graphics2D == null) {
+ return;
+ }
+
+ graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ paintImage(graphics2D, color);
+ }
+
+ protected abstract void paintImage(Graphics2D g2d, Color color);
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ @PostConstructResource
+ public void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ color = new Color(skin.getColorParameter(context, "tabDisabledTextColor"));
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ dataOutput.writeInt(color.getRGB());
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ color = new Color(dataInput.readInt());
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevron extends PanelIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+ path.moveTo(1, 1);
+
+ path.lineTo(17, 1);
+ path.lineTo(47, 31);
+ path.lineTo(17, 61);
+ path.lineTo(1, 61);
+ path.lineTo(31, 31);
+ path.closePath();
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelIconChevronBasic extends PanelIconBasic {
+ private static final int BUFFER_IMAGE_SIZE = 128;
+
+ @Override
+ protected void paintImage(Graphics2D graphics2d, Color color) {
+
+ BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE, BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimension();
+ g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+ g2d.translate(28, 28);
+ g2d.setColor(color);
+
+ GeneralPath path = new GeneralPath();
+ draw(path);
+
+ g2d.fill(path);
+ if (this instanceof PanelIconChevron
+ || this instanceof PanelIconChevronLeft) {
+ g2d.translate(24, 0);
+ } else {
+ g2d.translate(0, 24);
+ }
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE, dimension.getHeight() / BUFFER_IMAGE_SIZE);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
+ g2d.dispose();
+ }
+
+ abstract void draw(GeneralPath draw);
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevronDown extends PanelIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(1, 0);
+ path.lineTo(31, 30);
+ path.lineTo(61, 0);
+ path.lineTo(61, 16);
+ path.lineTo(31, 46);
+ path.lineTo(1, 16);
+ path.closePath();
+
+ }
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevronLeft extends PanelIconChevronBasic {
+
+ 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: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevronUp extends PanelIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(0, 46);
+ path.lineTo(0, 31);
+ path.lineTo(30, 1);
+ path.lineTo(61, 31);
+ path.lineTo(61, 46);
+ path.lineTo(30, 16);
+ path.closePath();
+
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Ellipse2D;
+
+@DynamicUserResource
+public class PanelIconDisc extends PanelIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ Dimension dimension = getDimension();
+ long dim = Math.round(dimension.getWidth() / 3);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(color);
+ g2d.translate(dim, dim);
+
+ g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+
+@DynamicUserResource
+public class PanelIconGrid extends PanelIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Rectangle2D.Float path = new Rectangle2D.Float();
+ Dimension dimension = getDimension();
+
+ g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+ g2d.translate(40, 40);
+
+ path.setRect(0, 0, 40, 40);
+
+ g2d.setColor(color);
+
+ Color bcolor = new Color(1f, 1f, 1f, 0f);
+
+ g2d.setBackground(bcolor);
+ g2d.fill(path);
+ g2d.clearRect(16, 0, 8, 40);
+ g2d.clearRect(0, 16, 40, 8);
+
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+
+@DynamicUserResource
+public class PanelIconSpacer extends PanelIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.*;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangle extends PanelIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47, 30);
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(33, 34);
+ path.lineTo(0, 67);
+ path.closePath();
+
+ }
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+/**
+ * @author Anton Belevich
+ */
+public abstract class PanelIconTriangleBasic extends PanelIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimension();
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+
+ draw(path, g2d);
+
+ g2d.setColor(color);
+ g2d.fill(path);
+
+ }
+
+ abstract void draw(GeneralPath path, Graphics2D g2d);
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangleDown extends PanelIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+
+ g2d.translate(31, 54);
+
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(34, 33);
+ path.lineTo(67, 0);
+ path.closePath();
+
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangleLeft extends PanelIconTriangleBasic {
+
+ 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();
+ }
+
+}
Copied: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java (from rev 21196, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java)
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java (rev 0)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangleUp extends PanelIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(31, 47);
+
+ path.moveTo(0, 33);
+ path.lineTo(33, 0);
+ path.lineTo(34, 0);
+ path.lineTo(67, 33);
+ path.closePath();
+ }
+
+}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,88 +0,0 @@
-/**
- * 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.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.AbstractJava2DUserResource;
-import org.richfaces.resource.PostConstructResource;
-import org.richfaces.resource.StateHolderResource;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
-/**
- * @author Alex.Kolonitsky
- */
-public abstract class PanelMenuIconBasic extends AbstractJava2DUserResource implements StateHolderResource {
-
- private static final Dimension DIMENSION = new Dimension(16, 16);
-
- private Color color;
-
- protected PanelMenuIconBasic() {
- super(DIMENSION);
- }
-
- public void paint(Graphics2D graphics2D) {
- if (color == null || graphics2D == null) {
- return;
- }
-
- graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- paintImage(graphics2D, color);
- }
-
- protected abstract void paintImage(Graphics2D g2d, Color color);
-
- public boolean isTransient() {
- return false;
- }
-
- @PostConstructResource
- public void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
- color = new Color(skin.getColorParameter(context, "tabDisabledTextColor"));
- }
-
- public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- dataOutput.writeInt(color.getRGB());
- }
-
- public void readState(FacesContext context, DataInput dataInput) throws IOException {
- color = new Color(dataInput.readInt());
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevron extends PanelMenuIconChevronBasic {
-
- protected void draw(GeneralPath path) {
- path.moveTo(1, 1);
-
- path.lineTo(17, 1);
- path.lineTo(47, 31);
- path.lineTo(17, 61);
- path.lineTo(1, 61);
- path.lineTo(31, 31);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,79 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-
-/**
- * @author Alex.Kolonitsky
- */
-public abstract class PanelMenuIconChevronBasic extends PanelMenuIconBasic {
- private static final int BUFFER_IMAGE_SIZE = 128;
-
- @Override
- protected void paintImage(Graphics2D graphics2d, Color color) {
-
- BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE, BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimension();
- g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
- g2d.translate(28, 28);
- g2d.setColor(color);
-
- GeneralPath path = new GeneralPath();
- draw(path);
-
- g2d.fill(path);
- if (this instanceof PanelMenuIconChevron
- || this instanceof PanelMenuIconChevronLeft) {
- g2d.translate(24, 0);
- } else {
- g2d.translate(0, 24);
- }
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE, dimension.getHeight() / BUFFER_IMAGE_SIZE);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
- g2d.dispose();
- }
-
- abstract void draw(GeneralPath draw);
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevronDown extends PanelMenuIconChevronBasic {
-
- protected void draw(GeneralPath path) {
-
- path.moveTo(1, 0);
- path.lineTo(31, 30);
- path.lineTo(61, 0);
- path.lineTo(61, 16);
- path.lineTo(31, 46);
- path.lineTo(1, 16);
- path.closePath();
-
- }
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevronLeft extends PanelMenuIconChevronBasic {
-
- void draw(GeneralPath path) {
- path.moveTo(61, 1);
- path.lineTo(45, 1);
- path.lineTo(15, 31);
- path.lineTo(45, 61);
- path.lineTo(61, 61);
- path.lineTo(30, 31);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,43 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevronUp extends PanelMenuIconChevronBasic {
-
- protected void draw(GeneralPath path) {
-
- path.moveTo(0, 46);
- path.lineTo(0, 31);
- path.lineTo(30, 1);
- path.lineTo(61, 31);
- path.lineTo(61, 46);
- path.lineTo(30, 16);
- path.closePath();
-
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,48 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Ellipse2D;
-
-@DynamicUserResource
-public class PanelMenuIconDisc extends PanelMenuIconBasic {
-
- @Override
- protected void paintImage(Graphics2D g2d, Color color) {
-
- Dimension dimension = getDimension();
- long dim = Math.round(dimension.getWidth() / 3);
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(color);
- g2d.translate(dim, dim);
-
- g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,67 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Rectangle2D;
-
-@DynamicUserResource
-public class PanelMenuIconGrid extends PanelMenuIconBasic {
-
- @Override
- protected void paintImage(Graphics2D g2d, Color color) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Rectangle2D.Float path = new Rectangle2D.Float();
- Dimension dimension = getDimension();
-
- g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
- g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
- g2d.translate(40, 40);
-
- path.setRect(0, 0, 40, 40);
-
- g2d.setColor(color);
-
- Color bcolor = new Color(1f, 1f, 1f, 0f);
-
- g2d.setBackground(bcolor);
- g2d.fill(path);
- g2d.clearRect(16, 0, 8, 40);
- g2d.clearRect(0, 16, 40, 8);
-
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,35 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-
-@DynamicUserResource
-public class PanelMenuIconSpacer extends PanelMenuIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.*;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangle extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(47, 30);
- path.moveTo(0, 0);
- path.lineTo(33, 33);
- path.lineTo(33, 34);
- path.lineTo(0, 67);
- path.closePath();
-
- }
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,54 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.GeneralPath;
-
-/**
- * @author Anton Belevich
- */
-public abstract class PanelMenuIconTriangleBasic extends PanelMenuIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
-
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimension();
- g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
-
- draw(path, g2d);
-
- g2d.setColor(color);
- g2d.fill(path);
-
- }
-
- abstract void draw(GeneralPath path, Graphics2D g2d);
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,44 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangleDown extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
-
- g2d.translate(31, 54);
-
- path.moveTo(0, 0);
- path.lineTo(33, 33);
- path.lineTo(34, 33);
- path.lineTo(67, 0);
- path.closePath();
-
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangleLeft extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(47, 30);
- path.moveTo(33, 0);
- path.lineTo(0, 33);
- path.lineTo(0, 34);
- path.lineTo(33, 67);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2011-01-25 01:09:50 UTC (rev 21189)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2011-01-25 12:31:56 UTC (rev 21197)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangleUp extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(31, 47);
-
- path.moveTo(0, 33);
- path.lineTo(33, 0);
- path.lineTo(34, 0);
- path.lineTo(67, 33);
- path.closePath();
- }
-
-}
Added: trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties (rev 0)
+++ trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 12:31:56 UTC (rev 21197)
@@ -0,0 +1,21 @@
+org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron
+
+org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown
+
+org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft
+
+org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp
+
+org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc
+
+org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid
+
+org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelIconSpacer
+
+org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle
+
+org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown
+
+org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft
+
+org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21196 - in trunk/ui/output/ui/src/main: resources/META-INF/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-25 07:08:46 -0500 (Tue, 25 Jan 2011)
New Revision: 21196
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java
Removed:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Log:
Panel menu icons refactoring
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,88 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.resource.AbstractJava2DUserResource;
+import org.richfaces.resource.PostConstructResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelIconBasic extends AbstractJava2DUserResource implements StateHolderResource {
+
+ private static final Dimension DIMENSION = new Dimension(16, 16);
+
+ private Color color;
+
+ protected PanelIconBasic() {
+ super(DIMENSION);
+ }
+
+ public void paint(Graphics2D graphics2D) {
+ if (color == null || graphics2D == null) {
+ return;
+ }
+
+ graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ paintImage(graphics2D, color);
+ }
+
+ protected abstract void paintImage(Graphics2D g2d, Color color);
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ @PostConstructResource
+ public void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ color = new Color(skin.getColorParameter(context, "tabDisabledTextColor"));
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ dataOutput.writeInt(color.getRGB());
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ color = new Color(dataInput.readInt());
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevron.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevron extends PanelIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+ path.moveTo(1, 1);
+
+ path.lineTo(17, 1);
+ path.lineTo(47, 31);
+ path.lineTo(17, 61);
+ path.lineTo(1, 61);
+ path.lineTo(31, 31);
+ path.closePath();
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronBasic.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelIconChevronBasic extends PanelIconBasic {
+ private static final int BUFFER_IMAGE_SIZE = 128;
+
+ @Override
+ protected void paintImage(Graphics2D graphics2d, Color color) {
+
+ BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE, BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimension();
+ g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+ g2d.translate(28, 28);
+ g2d.setColor(color);
+
+ GeneralPath path = new GeneralPath();
+ draw(path);
+
+ g2d.fill(path);
+ if (this instanceof PanelIconChevron
+ || this instanceof PanelIconChevronLeft) {
+ g2d.translate(24, 0);
+ } else {
+ g2d.translate(0, 24);
+ }
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE, dimension.getHeight() / BUFFER_IMAGE_SIZE);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
+ g2d.dispose();
+ }
+
+ abstract void draw(GeneralPath draw);
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronDown.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevronDown extends PanelIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(1, 0);
+ path.lineTo(31, 30);
+ path.lineTo(61, 0);
+ path.lineTo(61, 16);
+ path.lineTo(31, 46);
+ path.lineTo(1, 16);
+ path.closePath();
+
+ }
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronLeft.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevronLeft extends PanelIconChevronBasic {
+
+ 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: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconChevronUp.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconChevronUp extends PanelIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(0, 46);
+ path.lineTo(0, 31);
+ path.lineTo(30, 1);
+ path.lineTo(61, 31);
+ path.lineTo(61, 46);
+ path.lineTo(30, 16);
+ path.closePath();
+
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconDisc.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Ellipse2D;
+
+@DynamicUserResource
+public class PanelIconDisc extends PanelIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ Dimension dimension = getDimension();
+ long dim = Math.round(dimension.getWidth() / 3);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(color);
+ g2d.translate(dim, dim);
+
+ g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconGrid.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+
+@DynamicUserResource
+public class PanelIconGrid extends PanelIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Rectangle2D.Float path = new Rectangle2D.Float();
+ Dimension dimension = getDimension();
+
+ g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+ g2d.translate(40, 40);
+
+ path.setRect(0, 0, 40, 40);
+
+ g2d.setColor(color);
+
+ Color bcolor = new Color(1f, 1f, 1f, 0f);
+
+ g2d.setBackground(bcolor);
+ g2d.fill(path);
+ g2d.clearRect(16, 0, 8, 40);
+ g2d.clearRect(0, 16, 40, 8);
+
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconSpacer.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+
+@DynamicUserResource
+public class PanelIconSpacer extends PanelIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangle.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.*;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangle extends PanelIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47, 30);
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(33, 34);
+ path.lineTo(0, 67);
+ path.closePath();
+
+ }
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleBasic.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+/**
+ * @author Anton Belevich
+ */
+public abstract class PanelIconTriangleBasic extends PanelIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimension();
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+
+ draw(path, g2d);
+
+ g2d.setColor(color);
+ g2d.fill(path);
+
+ }
+
+ abstract void draw(GeneralPath path, Graphics2D g2d);
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleDown.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangleDown extends PanelIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+
+ g2d.translate(31, 54);
+
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(34, 33);
+ path.lineTo(67, 0);
+ path.closePath();
+
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleLeft.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangleLeft extends PanelIconTriangleBasic {
+
+ 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();
+ }
+
+}
Copied: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java (from rev 21189, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java)
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconTriangleUp.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelIconTriangleUp extends PanelIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(31, 47);
+
+ path.moveTo(0, 33);
+ path.lineTo(33, 0);
+ path.lineTo(34, 0);
+ path.lineTo(67, 33);
+ path.closePath();
+ }
+
+}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,88 +0,0 @@
-/**
- * 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.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.AbstractJava2DUserResource;
-import org.richfaces.resource.PostConstructResource;
-import org.richfaces.resource.StateHolderResource;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
-/**
- * @author Alex.Kolonitsky
- */
-public abstract class PanelMenuIconBasic extends AbstractJava2DUserResource implements StateHolderResource {
-
- private static final Dimension DIMENSION = new Dimension(16, 16);
-
- private Color color;
-
- protected PanelMenuIconBasic() {
- super(DIMENSION);
- }
-
- public void paint(Graphics2D graphics2D) {
- if (color == null || graphics2D == null) {
- return;
- }
-
- graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- paintImage(graphics2D, color);
- }
-
- protected abstract void paintImage(Graphics2D g2d, Color color);
-
- public boolean isTransient() {
- return false;
- }
-
- @PostConstructResource
- public void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
- color = new Color(skin.getColorParameter(context, "tabDisabledTextColor"));
- }
-
- public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- dataOutput.writeInt(color.getRGB());
- }
-
- public void readState(FacesContext context, DataInput dataInput) throws IOException {
- color = new Color(dataInput.readInt());
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevron extends PanelMenuIconChevronBasic {
-
- protected void draw(GeneralPath path) {
- path.moveTo(1, 1);
-
- path.lineTo(17, 1);
- path.lineTo(47, 31);
- path.lineTo(17, 61);
- path.lineTo(1, 61);
- path.lineTo(31, 31);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,79 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-
-/**
- * @author Alex.Kolonitsky
- */
-public abstract class PanelMenuIconChevronBasic extends PanelMenuIconBasic {
- private static final int BUFFER_IMAGE_SIZE = 128;
-
- @Override
- protected void paintImage(Graphics2D graphics2d, Color color) {
-
- BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE, BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimension();
- g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
- g2d.translate(28, 28);
- g2d.setColor(color);
-
- GeneralPath path = new GeneralPath();
- draw(path);
-
- g2d.fill(path);
- if (this instanceof PanelMenuIconChevron
- || this instanceof PanelMenuIconChevronLeft) {
- g2d.translate(24, 0);
- } else {
- g2d.translate(0, 24);
- }
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE, dimension.getHeight() / BUFFER_IMAGE_SIZE);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
- g2d.dispose();
- }
-
- abstract void draw(GeneralPath draw);
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevronDown extends PanelMenuIconChevronBasic {
-
- protected void draw(GeneralPath path) {
-
- path.moveTo(1, 0);
- path.lineTo(31, 30);
- path.lineTo(61, 0);
- path.lineTo(61, 16);
- path.lineTo(31, 46);
- path.lineTo(1, 16);
- path.closePath();
-
- }
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevronLeft extends PanelMenuIconChevronBasic {
-
- void draw(GeneralPath path) {
- path.moveTo(61, 1);
- path.lineTo(45, 1);
- path.lineTo(15, 31);
- path.lineTo(45, 61);
- path.lineTo(61, 61);
- path.lineTo(30, 31);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,43 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconChevronUp extends PanelMenuIconChevronBasic {
-
- protected void draw(GeneralPath path) {
-
- path.moveTo(0, 46);
- path.lineTo(0, 31);
- path.lineTo(30, 1);
- path.lineTo(61, 31);
- path.lineTo(61, 46);
- path.lineTo(30, 16);
- path.closePath();
-
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,48 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Ellipse2D;
-
-@DynamicUserResource
-public class PanelMenuIconDisc extends PanelMenuIconBasic {
-
- @Override
- protected void paintImage(Graphics2D g2d, Color color) {
-
- Dimension dimension = getDimension();
- long dim = Math.round(dimension.getWidth() / 3);
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(color);
- g2d.translate(dim, dim);
-
- g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,67 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Rectangle2D;
-
-@DynamicUserResource
-public class PanelMenuIconGrid extends PanelMenuIconBasic {
-
- @Override
- protected void paintImage(Graphics2D g2d, Color color) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Rectangle2D.Float path = new Rectangle2D.Float();
- Dimension dimension = getDimension();
-
- g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
- g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
- g2d.translate(40, 40);
-
- path.setRect(0, 0, 40, 40);
-
- g2d.setColor(color);
-
- Color bcolor = new Color(1f, 1f, 1f, 0f);
-
- g2d.setBackground(bcolor);
- g2d.fill(path);
- g2d.clearRect(16, 0, 8, 40);
- g2d.clearRect(0, 16, 40, 8);
-
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,35 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-
-@DynamicUserResource
-public class PanelMenuIconSpacer extends PanelMenuIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.*;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangle extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(47, 30);
- path.moveTo(0, 0);
- path.lineTo(33, 33);
- path.lineTo(33, 34);
- path.lineTo(0, 67);
- path.closePath();
-
- }
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,54 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.GeneralPath;
-
-/**
- * @author Anton Belevich
- */
-public abstract class PanelMenuIconTriangleBasic extends PanelMenuIconBasic {
-
- protected void paintImage(Graphics2D g2d, Color color) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
-
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimension();
- g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
-
- draw(path, g2d);
-
- g2d.setColor(color);
- g2d.fill(path);
-
- }
-
- abstract void draw(GeneralPath path, Graphics2D g2d);
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,44 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangleDown extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
-
- g2d.translate(31, 54);
-
- path.moveTo(0, 0);
- path.lineTo(33, 33);
- path.lineTo(34, 33);
- path.lineTo(67, 0);
- path.closePath();
-
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangleLeft extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(47, 30);
- path.moveTo(33, 0);
- path.lineTo(0, 33);
- path.lineTo(0, 34);
- path.lineTo(33, 67);
- path.closePath();
- }
-
-}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2011-01-25 12:08:46 UTC (rev 21196)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import org.richfaces.resource.DynamicUserResource;
-
-import java.awt.Graphics2D;
-import java.awt.geom.GeneralPath;
-
-@DynamicUserResource
-public class PanelMenuIconTriangleUp extends PanelMenuIconTriangleBasic {
-
- void draw(GeneralPath path, Graphics2D g2d) {
- g2d.translate(31, 47);
-
- path.moveTo(0, 33);
- path.lineTo(33, 0);
- path.lineTo(34, 0);
- path.lineTo(67, 33);
- path.closePath();
- }
-
-}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 12:06:37 UTC (rev 21195)
+++ trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 12:08:46 UTC (rev 21196)
@@ -18,27 +18,27 @@
org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
-org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevron
+org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron
-org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronDown
+org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown
-org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronLeft
+org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft
-org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronUp
+org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp
-org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconDisc
+org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc
-org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconGrid
+org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid
-org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconSpacer
+org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelIconSpacer
-org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangle
+org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle
-org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown
+org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown
-org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleLeft
+org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft
-org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp
+org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp
org.richfaces.images\:menu_list_bg.gif=org.richfaces.renderkit.html.BaseGradient\
{width=22, height=3, baseColorParam=additionalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
13 years, 11 months