1. 使用内建的 Skins
1) 基本的内建 Skin 都在 richfaces-impl-3.3.1.jar 文件中,包括: DEFAULT 、 plain 、 emeraldTown 、 blueSky 、 wine 、 japanCherry 、 ruby 、 classic 、 deepMarine 、 NULL 。
2) 新增的三个 Skins 在各自单独的 jar 文件中: laguna 、 darkX 、 glassX 。
3) 要使用内建的 Skins ,就要在 web.xml 文件中加入 org.richfaces.SKIN context 参数:
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>ruby</param-value>
</context-param>
4) 对于每一个 Skins 主题,在对应的 jar 文件的 META-INF/skins 路径下,都有对应的 properties 文件。 properties 文件里定义着不同 skins 的外观参数。
2. 创建自定义 Skins
1) 最简单的方法就是将现成 skin 的 properties 文件,复制到应用的 classpath 中,即 META-INF/skins 或 WEB-INF/classes 中,然后以自定义的名称命名文件,并修改其中的参数。
2) 另一种方式就是自己创建 properties 文件,并在其中声明从哪个现有 skin 进行扩展。如:
baseSkin=ruby
generalSizeFont=16px
headerSizeFont=16px
3) 通过查阅文档,可以得知需要修改哪些参数属性,以实现想要的外观效果。
3. 使用换肤和 CSS
三种使用途径:
l 使用 skin 生成的 CSS ;
l 重新定义 skin 插入的 CSS 类;
l 用控件的 style 或 styleClass 类的属性,添加自定义的 style 。
4. 其他应用
对于我来说,内建的 skin 基本已经足够使用了,等到真正需要的时候,再来学习这部分知识吧。
只有真正需要的,才能学完记得住,呵呵 ~
from:http://blog.csdn.net/gengv/archive/2009/06/17/4277583.aspx
分享到:
相关推荐
资源名称:精通JSF—基于EJBHibernateSpring开发实践视频教程资源目录:【】chapter13_code【】Jsf第七章【】JSF第二章【】Jsf第五章【】Jsf第八章【】Jsf第六章【】Jsf第十三章【】Jsf第十五章【】Jsf第十六章【】...
Topics in This Chapter • “Why JavaServer Faces?” on page 3 • “A Simple Example” on page 4 • “Development Environments for JSF” on page 13 • “An Analysis of the Sample Application” on page ...
Chapter 11. Input/Output PART II: NETWORK PROGRAMMING Chapter 12. Basic Networking Chapter 13. Socket Programming Chapter 14. Remote Method Invocation Chapter 15. Java Mail API Chapter 16. Applets ...
Title: Java EE 7 Development with NetBeans 8 Author: David R. Heffelfinger Length: 362 pages Edition: 1 Language: English Publisher: Packt Publishing ...Chapter 11: SOAP Web Services with JAX-WS
Develop, debug, test, and troubleshoot Java EE 7 applications rapidly with Eclipse About This Book Go beyond simply learning Java EE APIs and explore...Chapter 11. Java CPU Profiling and Memory Tracking
Discover how to use EJB 3.x, JSF 2.x, Ajax, JAX-RS, JAX-WS, and Spring with WildFly 8.1 A practical guide filled with easy-to-understand programming examples to help you gain hands-on experience with ...
Discover how to use EJB 3.x, JSF 2.x, Ajax, JAX-RS, JAX-WS, and Spring with WildFly 8.1 A practical guide filled with easy-to-understand programming examples to help you gain hands-on experience with ...
Chapter 1. Seam 入门.................................................................................................................................................................14 1.1. 试试看........
■ Chapter 11: Using MyBatis in Spring ...............................................................397 ■ Chapter 12: Designing and Implementing Spring-Based Applications ............437 ■ Chapter...
11 Hiding Data Fields and Static Methods 12 Initialization Blocks 13 Extended Discussions on Overriding Methods 14 Design Patterns 15 Text I/O Prior to JDK 1.5 (Reader and Writer Classes) 16 ...
本书涵盖了所有主要的Java EE 8 API,包括JSF 2.3,Enterprise JavaBeans(EJB)3.2,上下文和依赖关系。注入(CDI)2.0,WebSocket的Java API,JAX-RS 2.1,Servlet 4.0等。 说明和导航 所有代码都组织在文件夹中。...