Author: alexsmirnov
Date: 2009-04-21 20:56:37 -0400 (Tue, 21 Apr 2009)
New Revision: 13751
Added:
trunk/samples/themes/src/main/config/component/oldschool.xml
trunk/samples/themes/src/main/config/component/smooth.xml
trunk/samples/themes/src/main/java/org/richfaces/theme/images/BaseShadowGradient.java
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderLeft.java
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderRight.java
trunk/samples/themes/src/main/resources/META-INF/themes/oldschool.theme.properties
trunk/samples/themes/src/main/resources/META-INF/themes/smooth.theme.properties
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/oldschool.xcss
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss
trunk/samples/themes/src/main/templates/org/richfaces/oldschool.jspx
trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx
Removed:
trunk/samples/themes/src/main/config/component/theme1.xml
trunk/samples/themes/src/main/config/component/theme2.xml
trunk/samples/themes/src/main/resources/META-INF/themes/theme1.theme.properties
trunk/samples/themes/src/main/resources/META-INF/themes/theme2.theme.properties
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
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
trunk/samples/layout-sample/src/main/webapp/pages/index.xhtml
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java
Log:
Rounded backgroung images.
Themes 1&2 was renamed to 'smooth' and 'oldschool'
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
===================================================================
---
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2009-04-21
23:57:19 UTC (rev 13750)
+++
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2009-04-22
00:56:37 UTC (rev 13751)
@@ -25,6 +25,7 @@
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
+import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
@@ -150,11 +151,11 @@
return horizontal;
}
- protected void drawGradient(Graphics2D g2d, Rectangle2D rectangle, BiColor colors, int
height) {
+ protected void drawGradient(Graphics2D g2d, Shape shape, BiColor colors, int height) {
if (colors != null) {
GradientPaint gragient = new GradientPaint(0, 0, colors.getTopColor(), 0, height,
colors.getBottomColor());
g2d.setPaint(gragient);
- g2d.fill(rectangle);
+ g2d.fill(shape);
}
}
Modified: trunk/samples/layout-sample/src/main/webapp/pages/index.xhtml
===================================================================
(Binary files differ)
Copied: trunk/samples/themes/src/main/config/component/oldschool.xml (from rev 13743,
trunk/samples/themes/src/main/config/component/theme2.xml)
===================================================================
--- trunk/samples/themes/src/main/config/component/oldschool.xml
(rev 0)
+++ trunk/samples/themes/src/main/config/component/oldschool.xml 2009-04-22 00:56:37 UTC
(rev 13751)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"http://labs.jboss.com/jbossrichfaces/component-config.dtd">
+
+<components>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.OldSchoolThemeRenderer</name>
+ <family>org.richfaces.Page</family>
+ <template>org/richfaces/oldschool.jspx</template>
+ </renderer>
+</components>
\ No newline at end of file
Property changes on: trunk/samples/themes/src/main/config/component/oldschool.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/samples/themes/src/main/config/component/smooth.xml (from rev 13743,
trunk/samples/themes/src/main/config/component/theme1.xml)
===================================================================
--- trunk/samples/themes/src/main/config/component/smooth.xml (rev
0)
+++ trunk/samples/themes/src/main/config/component/smooth.xml 2009-04-22 00:56:37 UTC (rev
13751)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"http://labs.jboss.com/jbossrichfaces/component-config.dtd">
+
+<components>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.SmoothThemeRenderer</name>
+ <family>org.richfaces.Page</family>
+ <template>org/richfaces/smooth.jspx</template>
+ </renderer>
+</components>
\ No newline at end of file
Property changes on: trunk/samples/themes/src/main/config/component/smooth.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/samples/themes/src/main/config/component/theme1.xml
===================================================================
--- trunk/samples/themes/src/main/config/component/theme1.xml 2009-04-21 23:57:19 UTC (rev
13750)
+++ trunk/samples/themes/src/main/config/component/theme1.xml 2009-04-22 00:56:37 UTC (rev
13751)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <renderer generate="true" override="true">
- <name>org.richfaces.Theme1Renderer</name>
- <family>org.richfaces.Page</family>
- <template>org/richfaces/theme1.jspx</template>
- </renderer>
-</components>
\ No newline at end of file
Deleted: trunk/samples/themes/src/main/config/component/theme2.xml
===================================================================
--- trunk/samples/themes/src/main/config/component/theme2.xml 2009-04-21 23:57:19 UTC (rev
13750)
+++ trunk/samples/themes/src/main/config/component/theme2.xml 2009-04-22 00:56:37 UTC (rev
13751)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <renderer generate="true" override="true">
- <name>org.richfaces.Theme2Renderer</name>
- <family>org.richfaces.Page</family>
- <template>org/richfaces/theme2.jspx</template>
- </renderer>
-</components>
\ No newline at end of file
Added:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/BaseShadowGradient.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/BaseShadowGradient.java
(rev 0)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/images/BaseShadowGradient.java 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,120 @@
+package org.richfaces.theme.images;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.util.Zipper2;
+import org.richfaces.renderkit.html.BaseGradient;
+
+public abstract class BaseShadowGradient extends BaseGradient {
+
+ @SuppressWarnings("serial")
+ protected static class ShadowData extends BaseGradient.Data {
+
+ private Integer shadowColor;
+
+ /**
+ * @return the shadowColor
+ */
+ protected Integer getShadowColor() {
+ return shadowColor;
+ }
+
+ /**
+ * @param shadowColor the shadowColor to set
+ */
+ protected void setShadowColor(Integer shadowColor) {
+ this.shadowColor = shadowColor;
+ }
+
+ @Override
+ public byte[] toByteArray() {
+ byte[] bs = super.toByteArray();
+ byte[] result = new byte[(bs != null ? bs.length : 0) + 4];
+ new Zipper2(result).addInt(shadowColor).addBytes(bs);
+
+ return result;
+ }
+
+ }
+
+ public BaseShadowGradient(int width, int height, int gradientHeight,
+ String baseColor, String gradientColor, boolean horizontal) {
+ super(width, height, gradientHeight, baseColor, gradientColor,
+ horizontal);
+ }
+
+ public BaseShadowGradient(int width, int height, int gradientHeight) {
+ super(width, height, gradientHeight);
+ }
+
+ public BaseShadowGradient(int width, int height, int gradientHeight,
+ String baseColor, String gradientColor) {
+ super(width, height, gradientHeight, baseColor, gradientColor);
+ }
+
+ public BaseShadowGradient(int width, int height) {
+ super(width, height);
+ }
+
+ public BaseShadowGradient(int width, int height, String baseColor,
+ String gradientColor) {
+ super(width, height, baseColor, gradientColor);
+ }
+
+ public BaseShadowGradient() {
+ super();
+ }
+
+ public BaseShadowGradient(String baseColor, String gradientColor) {
+ super(baseColor, gradientColor);
+ }
+
+ public BaseShadowGradient(int width, int height, int gradientHeight,
+ boolean horizontal) {
+ super(width, height, gradientHeight, horizontal);
+ }
+
+ public BaseShadowGradient(int width, int height, boolean horizontal) {
+ super(width, height, horizontal);
+ }
+
+ public BaseShadowGradient(int width, int height, String baseColor,
+ String gradientColor, boolean horizontal) {
+ super(width, height, baseColor, gradientColor, horizontal);
+ }
+
+ public BaseShadowGradient(boolean horizontal) {
+ super(horizontal);
+ }
+
+ protected abstract String getShadowColor();
+
+ @Override
+ protected Data createData() {
+ return new ShadowData();
+ }
+
+ @Override
+ protected void saveData(FacesContext context, Data data, Object parameterData) {
+ super.saveData(context, data, parameterData);
+ ShadowData d = ((ShadowData) data);
+ d.setShadowColor(getShadowColor(context));
+ }
+
+ protected Integer getShadowColor(FacesContext context) {
+ return getColorValueParameter(context, getShadowColor(), false);
+ }
+
+ protected void restoreData(Data data, Zipper2 zipper2) {
+ if (zipper2.hasMore()) {
+ ((ShadowData) data).setShadowColor(zipper2.nextInt());
+ super.restoreData(data, zipper2);
+ }
+ }
+
+ public BaseShadowGradient(String baseColor, String gradientColor,
+ boolean horizontal) {
+ super(baseColor, gradientColor, horizontal);
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/BaseShadowGradient.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java
===================================================================
---
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java 2009-04-21
23:57:19 UTC (rev 13750)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderBackground.java 2009-04-22
00:56:37 UTC (rev 13751)
@@ -6,14 +6,15 @@
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
+import java.awt.geom.RoundRectangle2D;
-import org.richfaces.renderkit.html.BaseGradient;
+
/**
* @author asmirnov
*
*/
-public class ShadowHeaderBackground extends BaseGradient {
+public class ShadowHeaderBackground extends BaseShadowGradient {
public ShadowHeaderBackground() {
super(15, 95, 80,"headerGradientColor","headerBackgroundColor",
false);
@@ -21,10 +22,10 @@
@Override
protected void paintGradient(Graphics2D g2d, Data data) {
+ Dimension dim = getDimensions(null, 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){
@@ -33,4 +34,9 @@
g2d.fillRect(0,getGradientHeight(),dim.width,dim.height);
}
}
+
+ @Override
+ protected String getShadowColor() {
+ return "shadowBackgroundColor";
+ }
}
Added:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderLeft.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderLeft.java
(rev 0)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderLeft.java 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,24 @@
+/**
+ *
+ */
+package org.richfaces.theme.images;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.geom.RoundRectangle2D;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ShadowHeaderLeft extends ShadowHeaderBackground {
+
+ @Override
+ protected void paintGradient(Graphics2D g2d, Data data) {
+ Dimension dim = getDimensions(null, data);
+ RoundRectangle2D clip = new
RoundRectangle2D.Double(5,5,dim.width*2.0,dim.height*2.0,5,5);
+ g2d.setClip(clip);
+ super.paintGradient(g2d, data);
+ }
+
+}
Property changes on:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderLeft.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderRight.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderRight.java
(rev 0)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderRight.java 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,22 @@
+/**
+ *
+ */
+package org.richfaces.theme.images;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ShadowHeaderRight extends ShadowHeaderLeft {
+
+ @Override
+ protected void paintGradient(Graphics2D g2d, Data data) {
+ //x -> -x, y -> y
+ g2d.transform(new AffineTransform(-1, 0, 0, 1, 0, 0));
+ super.paintGradient(g2d, data);
+ }
+
+}
Property changes on:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/ShadowHeaderRight.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/samples/themes/src/main/resources/META-INF/themes/oldschool.theme.properties
(from rev 13743,
trunk/samples/themes/src/main/resources/META-INF/themes/theme2.theme.properties)
===================================================================
--- trunk/samples/themes/src/main/resources/META-INF/themes/oldschool.theme.properties
(rev 0)
+++
trunk/samples/themes/src/main/resources/META-INF/themes/oldschool.theme.properties 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,2 @@
+rendererType=org.richfaces.OldSchoolThemeRenderer
+styleSheet=resource\:///org/richfaces/renderkit/html/css/oldschool.xcss
Property changes on:
trunk/samples/themes/src/main/resources/META-INF/themes/oldschool.theme.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/samples/themes/src/main/resources/META-INF/themes/smooth.theme.properties
(from rev 13743,
trunk/samples/themes/src/main/resources/META-INF/themes/theme1.theme.properties)
===================================================================
--- trunk/samples/themes/src/main/resources/META-INF/themes/smooth.theme.properties
(rev 0)
+++
trunk/samples/themes/src/main/resources/META-INF/themes/smooth.theme.properties 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,2 @@
+rendererType=org.richfaces.SmoothThemeRenderer
+styleSheet=resource\:///org/richfaces/renderkit/html/css/smooth.xcss
Property changes on:
trunk/samples/themes/src/main/resources/META-INF/themes/smooth.theme.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/samples/themes/src/main/resources/META-INF/themes/theme1.theme.properties
===================================================================
---
trunk/samples/themes/src/main/resources/META-INF/themes/theme1.theme.properties 2009-04-21
23:57:19 UTC (rev 13750)
+++
trunk/samples/themes/src/main/resources/META-INF/themes/theme1.theme.properties 2009-04-22
00:56:37 UTC (rev 13751)
@@ -1,2 +0,0 @@
-rendererType=org.richfaces.Theme1Renderer
-styleSheet=resource:///org/richfaces/renderkit/html/css/theme1.xcss
Deleted: trunk/samples/themes/src/main/resources/META-INF/themes/theme2.theme.properties
===================================================================
---
trunk/samples/themes/src/main/resources/META-INF/themes/theme2.theme.properties 2009-04-21
23:57:19 UTC (rev 13750)
+++
trunk/samples/themes/src/main/resources/META-INF/themes/theme2.theme.properties 2009-04-22
00:56:37 UTC (rev 13751)
@@ -1,2 +0,0 @@
-rendererType=org.richfaces.Theme2Renderer
-styleSheet=resource:///org/richfaces/renderkit/html/css/theme2.xcss
Copied:
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/oldschool.xcss
(from rev 13743,
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss)
===================================================================
---
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/oldschool.xcss
(rev 0)
+++
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/oldschool.xcss 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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="generalBackgroundColor"/>
+ <u:style name="margin" value="0px"/>
+ </u:selector>
+
+ <u:selector name=".header_bg">
+ <u:style name="background-image">
+ <!-- images/bg_header.png -->
+ <f:resource f:key="org.richfaces.theme.images.HeaderBackground"/>
+ </u:style>
+ <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-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>
+
+ <u:selector name=".menu_col">
+ <u:style name="background" skin="generalBackgroundColor"/>
+ <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" />
+ <u:style name="border-bottom-color" skin="panelBorderColor"
/>
+ </u:selector>
+
+ <u:selector name=".content_col">
+ <u:style name="background" skin="generalBackgroundColor"/>
+ <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="*.menu_col, *.content_col, *.footer_bg">
+ <u:style name="font-family" skin="generalFamilyFont" />
+ <u:style name="color" skin="generalTextColor" />
+ <u:style name="font-size" skin="generalSizeFont" />
+ </u:selector>
+ <u:selector name="*.header_content">
+ <u:style name="font-family" skin="headerFamilyFont" />
+ <u:style name="color" skin="headerTextColor" />
+ <u:style name="font-size" skin="headerSizeFont" />
+ </u:selector>
+ <f:verbatim>
+ <![CDATA[
+/*.menu_width{width : 300px;}*/
+
+
+.page_size {
+ width : 100%;
+ height : 100%;
+}
+
+
+.header_content {
+ margin : 0px 0px 0px 0px;
+ height : 95px; position : relative;
+}
+
+.spacer{font-size : 1px;}
+
+
+.footer_bg_content {
+ margin : 0px 0px 0px 0px;
+ height : 45px;
+ position : relative;
+}
+ ]]>
+ </f:verbatim>
+</f:template>
\ No newline at end of file
Copied:
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss (from
rev 13743,
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme1.xcss)
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss
(rev 0)
+++
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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:style name="height" value="80px"/>
+ <u:style name="position" value="relative"/>
+ </u:selector>
+
+ <u:selector name=".header_bg_left">
+ <u:style name="background-image">
+ <!-- images/bg_header.png -->
+ <f:resource f:key="org.richfaces.theme.images.ShadowHeaderLeft"/>
+ </u:style>
+ <u:style name="background-repeat" value="no-repeat"/>
+ <u:style name="background-position" value="top left"/>
+ </u:selector>
+ <u:selector name=".header_bg_right">
+ <u:style name="background-image">
+ <!-- images/bg_header.png -->
+ <f:resource f:key="org.richfaces.theme.images.ShadowHeaderRight"/>
+ </u:style>
+ <u:style name="background-repeat" value="no-repeat"/>
+ <u:style name="background-position" value="top right"/>
+ <u:style name="height" value="80px"/>
+ </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;}
+
+.common_box {margin : 0px; }
+.spacer{font-size : 1px;}
+.left_col {background : url(images/bg_left.png) top left no-repeat; vertical-align :
top}
+.left_strut {background : url(images/bg_left_strut.png) top left no-repeat; height :
389px; width : 14px}
+.bg_tabbody {background : #c0c0c0}
+
+.menu_col {border-right : 2px solid #C0C0C0; vertical-align : top; background :
#FFFFFF;}
+.content_col {vertical-align : top; width : 100%; background : #FFFFFF;}
+
+.right_col {background : url(images/bg_right.png) top right no-repeat; vertical-align :
top}
+.right_strut {background : url(images/bg_right_strut.png) top right no-repeat; height :
389px; width : 14px}
+.footer_bg_left {background : url(images/bg_footer_left.png) top left no-repeat;}
+.footer_bg_right {background : url(images/bg_footer_right.png) top right no-repeat;
height : 72px;}
+.footer_bg_content {margin : 0px 10px 0px 10px; height : 53px; position : relative;}
+ ]]>
+ </f:verbatim>
+</f:template>
\ No newline at end of file
Deleted:
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-21
23:57:19 UTC (rev 13750)
+++
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme1.xcss 2009-04-22
00:56:37 UTC (rev 13751)
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<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;}
-
-.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;}
-.spacer{font-size : 1px;}
-.left_col {background : url(images/bg_left.png) top left no-repeat; vertical-align :
top}
-.left_strut {background : url(images/bg_left_strut.png) top left no-repeat; height :
389px; width : 14px}
-.bg_tabbody {background : #c0c0c0}
-
-.menu_col {border-right : 2px solid #C0C0C0; vertical-align : top; background :
#FFFFFF;}
-.content_col {vertical-align : top; width : 100%; background : #FFFFFF;}
-
-.right_col {background : url(images/bg_right.png) top right no-repeat; vertical-align :
top}
-.right_strut {background : url(images/bg_right_strut.png) top right no-repeat; height :
389px; width : 14px}
-.footer_bg_left {background : url(images/bg_footer_left.png) top left no-repeat;}
-.footer_bg_right {background : url(images/bg_footer_right.png) top right no-repeat;
height : 72px;}
-.footer_bg_content {margin : 0px 10px 0px 10px; height : 53px; position : relative;}
- ]]>
- </f:verbatim>
-</f:template>
\ No newline at end of file
Deleted:
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-21
23:57:19 UTC (rev 13750)
+++
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss 2009-04-22
00:56:37 UTC (rev 13751)
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<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="generalBackgroundColor"/>
- <u:style name="margin" value="0px"/>
- </u:selector>
-
- <u:selector name=".header_bg">
- <u:style name="background-image">
- <!-- images/bg_header.png -->
- <f:resource f:key="org.richfaces.theme.images.HeaderBackground"/>
- </u:style>
- <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-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>
-
- <u:selector name=".menu_col">
- <u:style name="background" skin="generalBackgroundColor"/>
- <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" />
- <u:style name="border-bottom-color" skin="panelBorderColor"
/>
- </u:selector>
-
- <u:selector name=".content_col">
- <u:style name="background" skin="generalBackgroundColor"/>
- <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="*.menu_col, *.content_col, *.footer_bg">
- <u:style name="font-family" skin="generalFamilyFont" />
- <u:style name="color" skin="generalTextColor" />
- <u:style name="font-size" skin="generalSizeFont" />
- </u:selector>
- <u:selector name="*.header_content">
- <u:style name="font-family" skin="headerFamilyFont" />
- <u:style name="color" skin="headerTextColor" />
- <u:style name="font-size" skin="headerSizeFont" />
- </u:selector>
- <f:verbatim>
- <![CDATA[
-/*.menu_width{width : 300px;}*/
-
-
-.page_size {
- width : 100%;
- height : 100%;
-}
-
-
-.header_content {
- margin : 0px 0px 0px 0px;
- height : 95px; position : relative;
-}
-
-.spacer{font-size : 1px;}
-
-
-.footer_bg_content {
- margin : 0px 0px 0px 0px;
- height : 45px;
- position : relative;
-}
- ]]>
- </f:verbatim>
-</f:template>
\ No newline at end of file
Copied: trunk/samples/themes/src/main/templates/org/richfaces/oldschool.jspx (from rev
13743, trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx)
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/oldschool.jspx
(rev 0)
+++ trunk/samples/themes/src/main/templates/org/richfaces/oldschool.jspx 2009-04-22
00:56:37 UTC (rev 13751)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+
xmlns:f="http://ajax4jsf.org/cdk/template"
+
xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:c="
http://java.sun.com/jsf/core"
+ xmlns:ui="
http://ajax4jsf.org/cdk/ui"
+ xmlns:u="
http://ajax4jsf.org/cdk/u"
+ xmlns:x="
http://ajax4jsf.org/cdk/x"
+
xmlns:h="http://jsf.exadel.com/header"
+
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.OldSchoolThemeRenderer"
+ baseclass="org.richfaces.renderkit.AbstractPageRenderer"
+ component="org.richfaces.component.UIPage"
+ >
+ <c:set var="namespace"
value="#{this:prolog(context,component)}"/>
+ <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 border="0" cellpadding="0" cellspacing="0"
class="rich-page">
+ <tr>
+ <td class="header_bg">
+ <div class="header_content">
+<!-- begin header -->
+ <u:insertFacet name="header"/>
+<!-- end header -->
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td width="100%" height="100%"
class="bg_tabbody">
+ <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']}px"></div>
+<!-- begin menu -->
+ <u:insertFacet name="sidebar"/>
+<!-- end meny -->
+ </td>
+ <td class="content_col">
+<!-- begin content -->
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+<!-- end content -->
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="footer_bg">
+ <div class="footer_bg_content">
+<!-- begin footer -->
+ <u:insertFacet name="footer"/>
+<!-- end footer -->
+ </div>
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
+</f:root>
\ No newline at end of file
Property changes on: trunk/samples/themes/src/main/templates/org/richfaces/oldschool.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx (from rev 13743,
trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx)
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx
(rev 0)
+++ trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx 2009-04-22 00:56:37
UTC (rev 13751)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+
xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c="
http://java.sun.com/jsf/core"
+ xmlns:ui="
http://ajax4jsf.org/cdk/ui"
+ xmlns:u="
http://ajax4jsf.org/cdk/u"
+ xmlns:x="
http://ajax4jsf.org/cdk/x"
+
xmlns:h="http://jsf.exadel.com/header"
+
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.SmoothThemeRenderer"
+ baseclass="org.richfaces.renderkit.AbstractPageRenderer"
+ component="org.richfaces.component.UIPage"
+ >
+ <c:set var="namespace"
value="#{this:prolog(context,component)}"/>
+ <html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
+ >
+<head>
+ <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 class="rich-page" border="0" cellpadding="0"
cellspacing="0">
+ <tr>
+ <td align="center" class="common_box">
+
+ <table height="100%" border="0" cellpadding="0"
cellspacing="0" class="page_size">
+ <tr>
+ <td colspan="3" class="header_bg_left">
+ <div class="header_bg_right">
+ <div class="spacer" style="height : 15px"></div>
+ <div class="header_content">
+ <u:insertFacet name="header"/>
+ </div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="left_col">
+ <div class="left_strut">
+ <br />
+ </div>
+ </td>
+ <td width="100%" height="100%"
class="bg_tabbody">
+ <table cellpadding="0" cellspacing="0" border="0"
width="100%" height="100%">
+ <tr>
+ <td class="menu_col">
+ <div class="spacer"
style="width:#{component.attributes['sidebarWidth']}px"></div>
+ <u:insertFacet name="sidebar"/>
+ </td>
+ <td class="content_col">
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="right_col">
+ <div class="right_strut">
+ <br />
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" class="footer_bg_left">
+ <div class="footer_bg_right">
+ <div class="footer_bg_content">
+ <u:insertFacet name="footer"/>
+
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+</f:root>
\ No newline at end of file
Property changes on: trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx 2009-04-21 23:57:19
UTC (rev 13750)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme1.jspx 2009-04-22 00:56:37
UTC (rev 13751)
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
-
xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c="
http://java.sun.com/jsf/core"
- xmlns:ui="
http://ajax4jsf.org/cdk/ui"
- xmlns:u="
http://ajax4jsf.org/cdk/u"
- xmlns:x="
http://ajax4jsf.org/cdk/x"
-
xmlns:h="http://jsf.exadel.com/header"
-
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
- class="org.richfaces.renderkit.html.Theme1Renderer"
- baseclass="org.richfaces.renderkit.AbstractPageRenderer"
- component="org.richfaces.component.UIPage"
- >
- <c:set var="namespace"
value="#{this:prolog(context,component)}"/>
- <html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
- >
-<head>
- <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 class="rich-page" border="0" cellpadding="0"
cellspacing="0">
- <tr>
- <td align="center" class="common_box">
-
- <table height="100%" border="0" cellpadding="0"
cellspacing="0" class="page_size">
- <tr>
- <td colspan="3" class="header_bg_left">
- <div class="header_bg_right">
- <div class="spacer" style="height : 15px"></div>
- <div class="header_content">
- <u:insertFacet name="header"/>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td class="left_col">
- <div class="left_strut">
- <br />
- </div>
- </td>
- <td width="100%" height="100%"
class="bg_tabbody">
- <table cellpadding="0" cellspacing="0" border="0"
width="100%" height="100%">
- <tr>
- <td class="menu_col">
- <div class="spacer"
style="width:#{component.attributes['sidebarWidth']}px"></div>
- <u:insertFacet name="sidebar"/>
- </td>
- <td class="content_col">
- <vcp:body>
- <f:call name="renderChildren" />
- </vcp:body>
- </td>
- </tr>
- </table>
- </td>
- <td class="right_col">
- <div class="right_strut">
- <br />
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="3" class="footer_bg_left">
- <div class="footer_bg_right">
- <div class="footer_bg_content">
- <u:insertFacet name="footer"/>
-
- </div>
- </div>
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table>
-</body>
-</html>
-</f:root>
\ No newline at end of file
Deleted: trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx 2009-04-21 23:57:19
UTC (rev 13750)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx 2009-04-22 00:56:37
UTC (rev 13751)
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
-
xmlns:f="http://ajax4jsf.org/cdk/template"
-
xmlns:jsp="http://java.sun.com/JSP/Page"
- xmlns:c="
http://java.sun.com/jsf/core"
- xmlns:ui="
http://ajax4jsf.org/cdk/ui"
- xmlns:u="
http://ajax4jsf.org/cdk/u"
- xmlns:x="
http://ajax4jsf.org/cdk/x"
-
xmlns:h="http://jsf.exadel.com/header"
-
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
- class="org.richfaces.renderkit.html.Theme2Renderer"
- baseclass="org.richfaces.renderkit.AbstractPageRenderer"
- component="org.richfaces.component.UIPage"
- >
- <c:set var="namespace"
value="#{this:prolog(context,component)}"/>
- <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 border="0" cellpadding="0" cellspacing="0"
class="rich-page">
- <tr>
- <td class="header_bg">
- <div class="header_content">
-<!-- begin header -->
- <u:insertFacet name="header"/>
-<!-- end header -->
- </div>
- </td>
- </tr>
- <tr>
- <td width="100%" height="100%"
class="bg_tabbody">
- <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']}px"></div>
-<!-- begin menu -->
- <u:insertFacet name="sidebar"/>
-<!-- end meny -->
- </td>
- <td class="content_col">
-<!-- begin content -->
- <vcp:body>
- <f:call name="renderChildren" />
- </vcp:body>
-<!-- end content -->
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="footer_bg">
- <div class="footer_bg_content">
-<!-- begin footer -->
- <u:insertFacet name="footer"/>
-<!-- end footer -->
- </div>
- </td>
- </tr>
- </table>
-</body>
-</html>
-</f:root>
\ No newline at end of file