[richfaces-svn-commits] JBoss Rich Faces SVN: r13557 - in trunk: samples/layout-sample/src/main/webapp and 9 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Apr 13 21:55:11 EDT 2009


Author: alexsmirnov
Date: 2009-04-13 21:55:10 -0400 (Mon, 13 Apr 2009)
New Revision: 13557

Added:
   trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/Base2WayGradient.java
   trunk/samples/layout-sample/src/main/webapp/images/
   trunk/samples/layout-sample/src/main/webapp/images/icons/
   trunk/samples/layout-sample/src/main/webapp/images/icons/arrow.png
   trunk/samples/layout-sample/src/main/webapp/images/icons/copy.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/create_doc.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/create_folder.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/cut.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/delete.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/edit.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/filter.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/find.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/ico_new_group.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/ico_new_item.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/open.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/paste.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/redo.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/reload.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/repeat.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/save.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/save_all.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/save_as.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/undo.gif
   trunk/samples/layout-sample/src/main/webapp/images/icons/verify.gif
   trunk/samples/themes/src/main/java/org/richfaces/theme/images/PageBackground.java
   trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java
Modified:
   trunk/samples/layout-sample/src/main/webapp/pages/index.xhtml
   trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
   trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
   trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme1.xcss
   trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
   trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx
   trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
   trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
   trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java
   trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
Log:
Theme 2 done, Theme 1 started

Added: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/Base2WayGradient.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/Base2WayGradient.java	                        (rev 0)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/Base2WayGradient.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -0,0 +1,218 @@
+/**
+ * 
+ */
+package org.richfaces.renderkit.html;
+
+import java.awt.Dimension;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+
+import org.richfaces.renderkit.html.BaseGradient;
+import org.richfaces.renderkit.html.images.GradientType;
+import org.richfaces.renderkit.html.images.GradientType.BiColor;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Base2WayGradient extends BaseGradient {
+
+
+	
+	
+	/**
+	 * @param horizontal
+	 */
+	public Base2WayGradient(boolean horizontal) {
+		super(horizontal);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param horizontal
+	 */
+	public Base2WayGradient(int width, int height, boolean horizontal) {
+		super(width, height, horizontal);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param gradientHeight
+	 * @param horizontal
+	 */
+	public Base2WayGradient(int width, int height, int gradientHeight,
+			boolean horizontal) {
+		super(width, height, gradientHeight, horizontal);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param gradientHeight
+	 * @param baseColor
+	 * @param gradientColor
+	 * @param horizontal
+	 */
+	public Base2WayGradient(int width, int height, int gradientHeight,
+			String baseColor, String gradientColor, boolean horizontal) {
+		super(width, height, gradientHeight, baseColor, gradientColor, horizontal);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param gradientHeight
+	 * @param baseColor
+	 * @param gradientColor
+	 */
+	public Base2WayGradient(int width, int height, int gradientHeight,
+			String baseColor, String gradientColor) {
+		super(width, height, gradientHeight, baseColor, gradientColor);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param gradientHeight
+	 */
+	public Base2WayGradient(int width, int height, int gradientHeight) {
+		super(width, height, gradientHeight);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param baseColor
+	 * @param gradientColor
+	 * @param horizontal
+	 */
+	public Base2WayGradient(int width, int height, String baseColor,
+			String gradientColor, boolean horizontal) {
+		super(width, height, baseColor, gradientColor, horizontal);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 * @param baseColor
+	 * @param gradientColor
+	 */
+	public Base2WayGradient(int width, int height, String baseColor,
+			String gradientColor) {
+		super(width, height, baseColor, gradientColor);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param width
+	 * @param height
+	 */
+	public Base2WayGradient(int width, int height) {
+		super(width, height);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param baseColor
+	 * @param gradientColor
+	 * @param horizontal
+	 */
+	public Base2WayGradient(String baseColor, String gradientColor,
+			boolean horizontal) {
+		super(baseColor, gradientColor, horizontal);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param baseColor
+	 * @param gradientColor
+	 */
+	public Base2WayGradient(String baseColor, String gradientColor) {
+		super(baseColor, gradientColor);
+		// TODO Auto-generated constructor stub
+	}
+
+	
+	protected void drawBackGradient(Graphics2D g2d, Rectangle2D rectangle, BiColor colors, int height) {
+		if (colors != null) {
+		    GradientPaint gragient = new GradientPaint(0, (float)(rectangle.getHeight()-height), colors.getBottomColor(), 0, (float) rectangle.getHeight(), colors.getTopColor());
+		    g2d.setPaint(gragient);
+		    g2d.fill(rectangle);
+		}
+	    }
+
+	
+	@Override
+	protected void paintGradient(Graphics2D g2d, Data data) {
+		Integer headerBackgroundColor = data.getHeaderBackgroundColor();
+	    Integer headerGradientColor = data.getHeaderGradientColor();
+
+	    if (headerBackgroundColor != null && headerGradientColor != null) {
+		BiColor biColor = new GradientType.BiColor(headerBackgroundColor, headerGradientColor);
+
+		GradientType type = data.getGradientType();
+		BiColor firstLayer = type.getFirstLayerColors(biColor);
+		BiColor secondLayer = type.getSecondLayerColors(biColor);
+
+		Dimension dim = getDimensions(null, data);
+
+		if (isHorizontal()) {
+		    //x -> y, y -> x
+		    g2d.transform(new AffineTransform(0, 1, 1, 0, 0, 0));
+		    dim.setSize(dim.height, dim.width);
+		}
+		
+		int localGradientHeight = getGradientHeight();
+		if (localGradientHeight < 0) {
+		    localGradientHeight = dim.height/2;
+		}
+		
+		Rectangle2D rect = new Rectangle2D.Float(
+			0, 
+			0, 
+			dim.width, 
+			localGradientHeight);
+
+		drawGradient(g2d, rect, firstLayer, localGradientHeight);
+		
+		rect = new Rectangle2D.Float(
+				0, 
+				localGradientHeight, 
+				dim.width, 
+				dim.height);
+		
+		drawBackGradient(g2d, rect, firstLayer, localGradientHeight);
+		
+		int smallGradientHeight = localGradientHeight / 2;
+		
+		rect = new Rectangle2D.Float(
+			0, 
+			0, 
+			dim.width, 
+			smallGradientHeight);
+
+		drawGradient(g2d, rect, secondLayer, smallGradientHeight);
+
+		rect = new Rectangle2D.Float(
+				0, 
+				dim.height-smallGradientHeight, 
+				dim.width, 
+				dim.height);
+		
+		drawBackGradient(g2d, rect, secondLayer, smallGradientHeight);
+	    }
+	}
+
+	
+}


Property changes on: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/Base2WayGradient.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/arrow.png
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/arrow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/copy.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/copy.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/create_doc.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/create_doc.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/create_folder.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/create_folder.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/cut.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/cut.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/delete.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/delete.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/edit.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/edit.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/filter.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/filter.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/find.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/find.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/ico_new_group.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/ico_new_group.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/ico_new_item.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/ico_new_item.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/open.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/open.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/paste.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/paste.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/redo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/redo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/reload.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/reload.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/repeat.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/repeat.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/save.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/save.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/save_all.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/save_all.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/save_as.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/save_as.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/undo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/undo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/layout-sample/src/main/webapp/images/icons/verify.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/layout-sample/src/main/webapp/images/icons/verify.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/samples/layout-sample/src/main/webapp/pages/index.xhtml
===================================================================
(Binary files differ)

Modified: trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -10,6 +10,7 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Rectangle2D;
 
+import org.richfaces.renderkit.html.Base2WayGradient;
 import org.richfaces.renderkit.html.BaseGradient;
 import org.richfaces.renderkit.html.images.GradientType;
 import org.richfaces.renderkit.html.images.GradientType.BiColor;
@@ -18,80 +19,11 @@
  * @author asmirnov
  *
  */
-public class FooterBackground extends BaseGradient {
+public class FooterBackground extends Base2WayGradient {
 
 	public FooterBackground() {
-		super(1, 95, 47,"panelBorderColor","generalBackgroundColor", false);
+		super(1, 96, 48,"panelBorderColor","generalBackgroundColor", false);
 	}
 	
-	protected void drawBackGradient(Graphics2D g2d, Rectangle2D rectangle, BiColor colors, int height) {
-		if (colors != null) {
-		    GradientPaint gragient = new GradientPaint(0, (float)(rectangle.getHeight()-height), colors.getBottomColor(), 0, (float) rectangle.getHeight(), colors.getTopColor());
-		    g2d.setPaint(gragient);
-		    g2d.fill(rectangle);
-		}
-	    }
 
-	
-	@Override
-	protected void paintGradient(Graphics2D g2d, Data data) {
-		Integer headerBackgroundColor = data.getHeaderBackgroundColor();
-	    Integer headerGradientColor = data.getHeaderGradientColor();
-
-	    if (headerBackgroundColor != null && headerGradientColor != null) {
-		BiColor biColor = new GradientType.BiColor(headerBackgroundColor, headerGradientColor);
-
-		GradientType type = data.getGradientType();
-		BiColor firstLayer = type.getFirstLayerColors(biColor);
-		BiColor secondLayer = type.getSecondLayerColors(biColor);
-
-		Dimension dim = getDimensions(null, data);
-
-		if (isHorizontal()) {
-		    //x -> y, y -> x
-		    g2d.transform(new AffineTransform(0, 1, 1, 0, 0, 0));
-		    dim.setSize(dim.height, dim.width);
-		}
-		
-		int localGradientHeight = getGradientHeight();
-		if (localGradientHeight < 0) {
-		    localGradientHeight = dim.height/2;
-		}
-		
-		Rectangle2D rect = new Rectangle2D.Float(
-			0, 
-			0, 
-			dim.width, 
-			localGradientHeight);
-
-		drawGradient(g2d, rect, firstLayer, localGradientHeight);
-		
-		rect = new Rectangle2D.Float(
-				0, 
-				localGradientHeight, 
-				dim.width, 
-				dim.height);
-		
-		drawBackGradient(g2d, rect, firstLayer, localGradientHeight);
-		
-		int smallGradientHeight = localGradientHeight / 2;
-		
-		rect = new Rectangle2D.Float(
-			0, 
-			0, 
-			dim.width, 
-			smallGradientHeight);
-
-		drawGradient(g2d, rect, secondLayer, smallGradientHeight);
-
-		rect = new Rectangle2D.Float(
-				0, 
-				dim.height-smallGradientHeight, 
-				dim.width, 
-				dim.height);
-		
-		drawBackGradient(g2d, rect, secondLayer, smallGradientHeight);
-	    }
-	}
-
 }

Modified: trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -16,7 +16,7 @@
 public class HeaderBackground extends BaseGradient {
 
 	public HeaderBackground() {
-		super(1, 95, 47,"headerBackgroundColor","headerGradientColor", false);
+		super(1, 95, 80,"headerBackgroundColor","headerGradientColor", false);
 	}
 	
 	@Override

Added: trunk/samples/themes/src/main/java/org/richfaces/theme/images/PageBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/PageBackground.java	                        (rev 0)
+++ trunk/samples/themes/src/main/java/org/richfaces/theme/images/PageBackground.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -0,0 +1,18 @@
+/**
+ * 
+ */
+package org.richfaces.theme.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PageBackground extends BaseGradient {
+
+	public PageBackground() {
+		super(1, 450, 450, "headerBackgroundColor", "headerGradientColor");
+	}
+	
+}


Property changes on: trunk/samples/themes/src/main/java/org/richfaces/theme/images/PageBackground.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java	                        (rev 0)
+++ trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -0,0 +1,36 @@
+/**
+ * 
+ */
+package org.richfaces.theme.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ShadowHeaderBackground extends BaseGradient {
+
+	public ShadowHeaderBackground() {
+		super(15, 95, 80,"headerGradientColor","headerBackgroundColor", false);
+	}
+	
+	@Override
+	protected void paintGradient(Graphics2D g2d, Data data) {
+		// Paint gradient itself
+		super.paintGradient(g2d, data);
+		// Paint lower bar
+		Dimension dim = getDimensions(null, data);
+		Integer headerBackgroundColor = data.getHeaderBackgroundColor();
+
+		if(headerBackgroundColor != null && dim.height > getGradientHeight() && getGradientHeight() >=0){
+			g2d.setPaint(null);
+			g2d.setColor(new Color(headerBackgroundColor));
+			g2d.fillRect(0,getGradientHeight(),dim.width,dim.height);
+		}
+	}
+}


Property changes on: trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Modified: trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme1.xcss
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme1.xcss	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme1.xcss	2009-04-14 01:55:10 UTC (rev 13557)
@@ -3,14 +3,46 @@
 <f:template xmlns:f='http:/jsf.exadel.com/template'
    xmlns:u='http:/jsf.exadel.com/template/util'
    xmlns="http://www.w3.org/1999/xhtml">
+	<u:selector name="body">
+		<u:style name="background" skin="headerGradientColor"/>
+		<u:style name="margin" value="0px"/>
+		<u:style name="background-image">
+		    <!-- images/bg_header.png -->
+			<f:resource f:key="org.richfaces.theme.images.PageBackground"/>
+		</u:style>
+		<u:style name="background-repeat" value="repeat-x"/>
+		<u:style name="background-position" value="top left"/>
+	</u:selector>
+		<u:selector name=".header_content">
+		<u:style name="background-image">
+		    <!-- images/bg_header.png -->
+			<f:resource f:key="org.richfaces.theme.images.ShadowHeaderBackground"/>
+		</u:style>
+		<u:style name="margin" value="0px 10px 0px 10px" />
+		<u:style name="border-bottom-color" skin="generalBackgroundColor" />
+		<u:style name="background-color" skin="headerBackgroundColor"/>
+		<u:style name="background-repeat" value="repeat-x"/>
+		<u:style name="background-position" value="top left"/>
+	</u:selector>
+	
+	<u:selector name=".footer_bg">
+		<u:style name="background-image">
+		    <!-- images/bg_footer.png -->
+			<f:resource f:key="org.richfaces.theme.images.FooterBackground"/>
+		</u:style>
+		<u:style name="border-top" value="1px solid" />
+		<u:style name="border-top-color" skin="generalBackgroundColor" />
+		<u:style name="background-color" skin="panelBorderColor"/>
+		<u:style name="background-repeat" value="repeat-x"/>
+		<u:style name="background-position" value="center left"/>
+	</u:selector>
 
 	<f:verbatim>
 		<![CDATA[
 .page_size{width : 90%;}
 .menu_width{width : 300px;}
 
-body {margin : 0px; background : url(images/bg_page.png) top left #93C4E5;}
-.common_box {margin : 0px; background : url(images/bg_grad_page.png) top left repeat-x;}
+.common_box {margin : 0px; }
 .header_bg_left {background : url(images/bg_header_left.png) top left no-repeat;}
 .header_bg_right {background : url(images/bg_header_right.png) top right no-repeat; height : 105px;}
 .header_content {margin : 0px 10px 0px 10px; height : 80px; position : relative;}

Modified: trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss	2009-04-14 01:55:10 UTC (rev 13557)
@@ -64,7 +64,7 @@
 	</u:selector>
 	<f:verbatim>
 		<![CDATA[
-.menu_width{width : 300px;}
+/*.menu_width{width : 300px;}*/
 
 
 .page_size {

Modified: trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx	2009-04-14 01:55:10 UTC (rev 13557)
@@ -15,15 +15,27 @@
 	<html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
 		>
 <head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 		   <title>#{component.attributes['pageTitle']}</title>
 		   <f:call name="themeStyle"/>
 		   <f:call name="themeScript"/>
+   		<style type="text/css">   		
+		   <jsp:scriptlet><![CDATA[
+		   		Integer width = (Integer) component.getAttributes().get("width");
+		if (null != width && width.intValue() > 0) {
+			StringBuilder format = new StringBuilder(
+					".rich-page{margin:auto;text-align:left;");
+			format.append("width:").append(width).append("px;");
+			writer.write(format.toString());
+		} else {
+			writer.write(".rich-page{width:100%;}\n");
+		}
+		   ]]></jsp:scriptlet>
+		   </style>
 		   <u:insertFacet name="pageHeader"/>
 
 </head>
 <body  x:passThruWithExclusions="value,name,type,id">
-<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
+<table class="rich-page" border="0" cellpadding="0" cellspacing="0">
 	<tr>
 		<td align="center" class="common_box">
 
@@ -48,7 +60,7 @@
 						<table cellpadding="0" cellspacing="0" border="0"  width="100%" height="100%">
 							<tr>
 								<td class="menu_col">
-									<div class="menu_width spacer"></div>
+									<div class="spacer" style="width:#{component.attributes['sidebarWidth']}px"></div>
 		         <u:insertFacet name="sidebar"/>
 								</td>
 								<td class="content_col">

Modified: trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx	2009-04-14 01:55:10 UTC (rev 13557)
@@ -19,8 +19,19 @@
 		   <title>#{component.attributes['pageTitle']}</title>
 		   <f:call name="themeStyle"/>
 		   <f:call name="themeScript"/>
-		   <jsp:scriptlet>
-		   </jsp:scriptlet>		   
+   		<style type="text/css">   		
+		   <jsp:scriptlet><![CDATA[
+		   		Integer width = (Integer) component.getAttributes().get("width");
+		if (null != width && width.intValue() > 0) {
+			StringBuilder format = new StringBuilder(
+					".rich-page{margin:auto;text-align:left;");
+			format.append("width:").append(width).append("px;");
+			writer.write(format.toString());
+		} else {
+			writer.write(".rich-page{width:100%;}\n");
+		}
+		   ]]></jsp:scriptlet>
+		   </style>
 		   <u:insertFacet name="pageHeader"/>
 
 </head>
@@ -40,7 +51,7 @@
 						<table cellpadding="0" cellspacing="0" border="0"  width="100%" height="100%">
 							<tr>
 								<td class="menu_col">
-									<div class="menu_width spacer" style="width:#{component.attributes['sidebarWidth']}"></div>
+									<div class="menu_width spacer" style="width:#{component.attributes['sidebarWidth']}px"></div>
 <!-- begin menu -->
 		         <u:insertFacet name="sidebar"/>
 <!-- end meny -->

Modified: trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
===================================================================
--- trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -185,11 +185,11 @@
 			String position;
 			if ("right".equals(sidebarPosition)) {
 				writer
-						.write(".rich-page-main{float:left;margin-right:-25em;}\n");
+						.write(".rich-page-main{float:left;margin-right:-30em;}\n");
 				position = "right";
 			} else {
 				writer
-						.write(".rich-page-main{float:right;margin-left:-25em;}\n");
+						.write(".rich-page-main{float:right;margin-left:-30em;}\n");
 				position = "left";
 			}
 			Integer sidebarWidth = (Integer) attributes.get("sidebarWidth");

Modified: trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java
===================================================================
--- trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java	2009-04-14 01:55:10 UTC (rev 13557)
@@ -3,15 +3,16 @@
  */
 package org.richfaces.renderkit.html.images;
 
+import org.richfaces.renderkit.html.Base2WayGradient;
 import org.richfaces.renderkit.html.BaseGradient;
 
 /**
  * @author asmirnov
  *
  */
-public class PageFooterGradient extends BaseGradient {
+public class PageFooterGradient extends Base2WayGradient {
 
 	public PageFooterGradient() {
-		super(1, 95, 47,"panelBorderColor","generalBackgroundColor", false);
+		super(1, 100, 50,"panelBorderColor","generalBackgroundColor", false);
 	}
 }

Modified: trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
===================================================================
--- trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss	2009-04-14 00:04:45 UTC (rev 13556)
+++ trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss	2009-04-14 01:55:10 UTC (rev 13557)
@@ -29,16 +29,16 @@
 		<u:style name="background-position" value="top left"/>
 		<u:style name="border-bottom" value="1px solid" />
 		<u:style name="border-bottom-color" skin="generalBackgroundColor" />
-		<u:style name="background-color" skin="headerBackgroundColor"/>
+		<u:style name="background-color" skin="headerGradientColor"/>
 		<u:style name="min-height" value="40px" />
 		<u:style name="padding" value="0 20px" />
 		<u:style name="color" skin="trimColor" />
 	</u:selector>
 
 	<u:selector name=".rich-page-content">
-		<u:style name="background-image">
+		<!-- u:style name="background-image">
 			<f:resource f:key="org.richfaces.renderkit.html.images.PageContentGradient"/>
-		</u:style>
+		</u:style-->
 		<u:style name="min-height" value="200px" />
 		<u:style name="background-color" skin="generalBackgroundColor"/>
 		<u:style name="background-repeat" value="repeat-x"/>
@@ -46,15 +46,15 @@
 	</u:selector>
 	
 	<u:selector name=".rich-page-main">
+		<u:style name="border-top" value="2px solid" />
+		<u:style name="border-top-color" skin="panelBorderColor" />
+		<u:style name="border-bottom" value="2px solid" />
+		<u:style name="border-bottom-color" skin="panelBorderColor" />
 	</u:selector>
 	
 	<u:selector name=".rich-page-body">
 		<u:style name="vertical-align" value="top"/>
 		<u:style name="width" value="100%"/>
-		<u:style name="border-top" value="2px solid" />
-		<u:style name="border-top-color" skin="panelBorderColor" />
-		<u:style name="border-bottom" value="2px solid" />
-		<u:style name="border-bottom-color" skin="panelBorderColor" />
 	</u:selector>
 	
 	<u:selector name=".rich-page-footer">
@@ -65,7 +65,7 @@
 		<u:style name="border-top-color" skin="generalBackgroundColor" />
 		<u:style name="background-color" skin="panelBorderColor"/>
 		<u:style name="background-repeat" value="repeat-x"/>
-		<u:style name="background-position" value="top left"/>
+		<u:style name="background-position" value="center left"/>
 		<u:style name="text-align" value="center" />
 		<u:style name="padding" value="20px 0" />
 	</u:selector>
@@ -73,8 +73,6 @@
 	<u:selector name=".rich-page-sidebar">
 		<!--u:style name="padding" value="0 20px 0 20px" /-->
 		<u:style name="vertical-align" value="top"/>
-		<u:style name="border-top" value="2px solid" />
-		<u:style name="border-top-color" skin="panelBorderColor" />
 		<u:style name="border-right" value="2px solid" />
 		<u:style name="border-right-color" skin="panelBorderColor" />
 		<u:style name="border-bottom" value="2px solid" />




More information about the richfaces-svn-commits mailing list