[richfaces-svn-commits] JBoss Rich Faces SVN: r1129 - in trunk/richfaces: common/src/main/java/org/richfaces/renderkit/html/images and 2 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Jun 11 14:08:32 EDT 2007


Author: sergeyhalipov
Date: 2007-06-11 14:08:32 -0400 (Mon, 11 Jun 2007)
New Revision: 1129

Added:
   trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/
   trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
   trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
Removed:
   trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
   trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
   trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
   trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
Log:
Correct support for "plain" skin added.

Added: trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java	                        (rev 0)
+++ trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java	2007-06-11 18:08:32 UTC (rev 1129)
@@ -0,0 +1,66 @@
+/**
+ * License Agreement.
+ *
+ *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007  Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.Java2Dresource;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+public abstract class SliderArrowBase  extends Java2Dresource{
+	private static final Dimension dimensions = new Dimension(7, 8);
+
+	public SliderArrowBase() {
+		setRenderer(new GifRenderer());
+		setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+	}
+	
+	protected Dimension getDimensions(ResourceContext resourceContext) {
+		return dimensions;
+	}
+	public Dimension getDimensions(FacesContext facesContext, Object data) {
+		return dimensions;
+	}
+
+	protected void paint(ResourceContext context, Graphics2D g2d) {
+		Integer color = (Integer) restoreData(context);
+		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		g2d.setColor(new Color(color.intValue()));
+		g2d.drawLine(0,2,6,2);
+		g2d.drawLine(1,3,5,3);
+		g2d.drawLine(2,4,4,4);
+		g2d.drawLine(3,5,3,5);
+	}
+	
+	public boolean isCacheable() {
+		return true;
+	}
+
+}

Added: trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java	                        (rev 0)
+++ trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java	2007-06-11 18:08:32 UTC (rev 1129)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007  Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.renderkit.html.images;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.HtmlColor;
+
+public class SliderArrowImage extends SliderArrowBase {
+	protected Object getDataToStore(FacesContext context, Object data) {
+		Skin skin = SkinFactory.getInstance().getSkin(context);
+		
+		String skinParameter = "generalTextColor";
+		String tmp = (String) skin.getParameter(context, skinParameter);
+		if (null == tmp || "".equals(tmp)) {
+			Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+			tmp = (String) defaultSkin.getParameter(context, skinParameter);
+		}
+		int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
+		return new Integer(intValue);
+	}
+
+}
\ No newline at end of file

Deleted: trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java	2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java	2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,66 +0,0 @@
-/**
- * License Agreement.
- *
- *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007  Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces.renderkit.html.images;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.util.Date;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.resource.GifRenderer;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.Java2Dresource;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-public abstract class SliderArrowBase  extends Java2Dresource{
-	private static final Dimension dimensions = new Dimension(7, 8);
-
-	public SliderArrowBase() {
-		setRenderer(new GifRenderer());
-		setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
-	}
-	
-	protected Dimension getDimensions(ResourceContext resourceContext) {
-		return dimensions;
-	}
-	public Dimension getDimensions(FacesContext facesContext, Object data) {
-		return dimensions;
-	}
-
-	protected void paint(ResourceContext context, Graphics2D g2d) {
-		Integer color = (Integer) restoreData(context);
-		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-		g2d.setColor(new Color(color.intValue()));
-		g2d.drawLine(0,2,6,2);
-		g2d.drawLine(1,3,5,3);
-		g2d.drawLine(2,4,4,4);
-		g2d.drawLine(3,5,3,5);
-	}
-	
-	public boolean isCacheable() {
-		return true;
-	}
-
-}

Deleted: trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java	2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java	2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,44 +0,0 @@
-/**
- * License Agreement.
- *
- *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007  Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces.renderkit.html.images;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.skin.SkinFactory;
-import org.ajax4jsf.framework.util.HtmlColor;
-
-public class SliderArrowImage extends SliderArrowBase {
-	protected Object getDataToStore(FacesContext context, Object data) {
-		Skin skin = SkinFactory.getInstance().getSkin(context);
-		
-		String skinParameter = "generalTextColor";
-		String tmp = (String) skin.getParameter(context, skinParameter);
-		if (null == tmp || "".equals(tmp)) {
-			Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
-			tmp = (String) defaultSkin.getParameter(context, skinParameter);
-		}
-		int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
-		return new Integer(intValue);
-	}
-
-}
\ No newline at end of file

Deleted: trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java	2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java	2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,66 +0,0 @@
-/**
- * License Agreement.
- *
- *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007  Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces.renderkit.html.images;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.util.Date;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.resource.GifRenderer;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.Java2Dresource;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-public abstract class SliderArrowBase  extends Java2Dresource{
-	private static final Dimension dimensions = new Dimension(7, 8);
-
-	public SliderArrowBase() {
-		setRenderer(new GifRenderer());
-		setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
-	}
-	
-	protected Dimension getDimensions(ResourceContext resourceContext) {
-		return dimensions;
-	}
-	public Dimension getDimensions(FacesContext facesContext, Object data) {
-		return dimensions;
-	}
-
-	protected void paint(ResourceContext context, Graphics2D g2d) {
-		Integer color = (Integer) restoreData(context);
-		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-		g2d.setColor(new Color(color.intValue()));
-		g2d.drawLine(0,2,6,2);
-		g2d.drawLine(1,3,5,3);
-		g2d.drawLine(2,4,4,4);
-		g2d.drawLine(3,5,3,5);
-	}
-	
-	public boolean isCacheable() {
-		return true;
-	}
-
-}

Deleted: trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java	2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java	2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,44 +0,0 @@
-/**
- * License Agreement.
- *
- *  JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007  Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces.renderkit.html.images;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.skin.SkinFactory;
-import org.ajax4jsf.framework.util.HtmlColor;
-
-public class SliderArrowImage extends SliderArrowBase {
-	protected Object getDataToStore(FacesContext context, Object data) {
-		Skin skin = SkinFactory.getInstance().getSkin(context);
-		
-		String skinParameter = "generalTextColor";
-		String tmp = (String) skin.getParameter(context, skinParameter);
-		if (null == tmp || "".equals(tmp)) {
-			Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
-			tmp = (String) defaultSkin.getParameter(context, skinParameter);
-		}
-		int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
-		return new Integer(intValue);
-	}
-
-}
\ No newline at end of file




More information about the richfaces-svn-commits mailing list