incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r409714 - in /incubator/adffaces/trunk/adf-faces: adf-faces-demo/src/main/webapp/skins/purple/ adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/ adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/ adf...
Date Fri, 26 May 2006 18:22:38 GMT
Author: awiner
Date: Fri May 26 11:22:38 2006
New Revision: 409714

URL: http://svn.apache.org/viewvc?rev=409714&view=rev
Log:
ADFFACES-11: add right-to-left support of skinning styles

Modified:
    incubator/adffaces/trunk/adf-faces/adf-faces-demo/src/main/webapp/skins/purple/purpleSkin.css
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/CoreAdfRenderingContext.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinCSSDocumentHandler.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinSelectorPropertiesNode.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetNode.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetParserUtils.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/style/util/StyleUtils.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/RootRenderingContext.java

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-demo/src/main/webapp/skins/purple/purpleSkin.css
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-demo/src/main/webapp/skins/purple/purpleSkin.css?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-demo/src/main/webapp/skins/purple/purpleSkin.css (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-demo/src/main/webapp/skins/purple/purpleSkin.css Fri May 26 11:22:38 2006
@@ -13,502 +13,516 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-
-/** Change the colors to purple **/
-
-/** All these styles/icons/properties are overrides of the simple skin */
-
-/** :alias means that this class or icon is not used directly. It is included
-in other component's style selectors or other component's icons. It is 
-meant to be a fast way to change styles. The alternative is to style each 
-component. **/
-.AFInstructionText
-{
-  font-size: medium;
-}
-
-.AFDarkForeground:alias {color:#035D5C;}
-.AFDarkBackground:alias {background-color:Purple;}
-/** In the base styles, AFDarkBorder uses the background-color of 
-    AFDarkBackground for its border color, so no need to set it directly. */
-    
-/* make up a color for hovering over menuTabs and menuBars */
-/* put the extension :alias so it won't get written out to the final css file,
-   cuz I know it won't be used directly. Instead it will be included in
-   other style definions using the -ora-rule-ref property. */
-.MyLinkHoverColor:alias { color:Lime; }
-
-
-/* a teal color */
-.AFLinkForeground:alias {color:#008080}
-
-/** BUTTON STYLES. Notice the right to left icons are specified with the
-:rtl pseudo-class. If :rtl icons are not specified, we default to non-:rtl icons. **/
-
-/** use this to color the button background and text **/
-.AFButtonServerText:alias {background-color:#CECFCE; color:#25009E}
-/* antialias the text for our disabled buttons */
-.AFButtonServerTextDisabled:alias {background-color:#F0F0F0; color:gray;-ora-text-antialias:true}
-
-
-.AFButtonStartIcon:alias {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
-
-.AFButtonStartIcon:alias:rtl {content:url(/skins/purple/images/btne.gif); width:7px; height:18px}
-
-.AFButtonEndIcon:alias {content:url(/skins/purple/images/btne.gif); width:7px; height:18px}
-.AFButtonEndIcon:alias:rtl {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
-
-.AFButtonTopBackgroundIcon:alias {content:url(/skins/purple/images/btntb.gif); width:1px; height:2px}
-.AFButtonTopBackgroundIcon:alias:rtl {content:url(/skins/purple/images/btntb.gif); width:1px; height:2px}
-
-.AFButtonBottomBackgroundIcon:alias {content:url(/skins/purple/images/btnbb.gif); width:1px; height:2px}
-.AFButtonBottomBackgroundIcon:alias:rtl {content:url(/skins/purple/images/btnbb.gif); width:1px; height:2px}
-
-.AFButtonDisabledStartIcon:alias {content:url(/skins/purple/images/btnds.gif); width:7px; height:18px}
-.AFButtonDisabledStartIcon:alias:rtl {content:url(/skins/purple/images/btnde.gif); width:7px; height:18px}
-.AFButtonDisabledEndIcon:alias {content:url(/skins/purple/images/btnde.gif); width:7px; height:18px}
-.AFButtonDisabledEndIcon:alias:rtl {content:url(/skins/purple/images/btnds.gif); width:7px; height:18px}
-
-.AFButtonDisabledTopBackgroundIcon:alias {content:url(/skins/purple/images/btndtb.gif); width:1px; height:2px}
-
-.AFButtonDisabledBottomBackgroundIcon:alias {content:url(/skins/purple/images/btndbb.gif); width:1px; height:2px}
-
-/** generic background for light panelBox's or shuttles **/
-.AFBoxBackground:alias {background-color:#E3E1E1;}
-
-/** when the panelBox is dark, this is the background color */
-.AFPanelBoxDarkBackground:alias {background-color:green}
-
-/** showOneTab **/
-/** ---------- **/
-/** .AFShowOneTab:alias is included in af|showOneTab::orientation-top and 
-    af|showOneTab::orientation-bottom which are the styles on the table. **/
-.AFShowOneTab:alias {
-  background-color:#BB95BB; 
-  text-align:center;
-}
-/** make the top tab bar have a solid border underneath **/
-af|showOneTab::orientation-top
-{
-  border-bottom: 3px solid black;
-}
-/** make the bottom tab bar have a solid border on top **/
-af|showOneTab::orientation-bottom
-{
-  border-top: 3px solid black;
-}
-
-af|showOneTab::separator {
-  margin-width:4px;
-  border-top: #BB95BB; solid 4pt ;
-  border-bottom: #BB95BB; solid 4pt ;
-  BACKGROUND-COLOR: white;
-  PADDING-LEFT: 1px;}
-
-af|showOneTab::tab {
-  font-weight:bold;
-  font-family:Tahoma; 
-  padding:2px 8px;
-}
-
-af|showOneTab::tab-selected {
-  font-family:Tahoma;
-  padding:2px 8px; 
-  text-decoration: none; 
-  background-color:white
-}  
-
-af|showOneTab::tab-link {
-  color:white;
-  text-decoration: none;
-}
-
-af|showOneTab::tab-link:hover
-{
-  -ora-rule-ref:selector(".MyLinkHoverColor:alias");
-}
-
-/* put some space in the
-first cell */
-af|showOneTab::cell-start {
-  background-color:transparent; 
-  padding-left:10px
-}
-/** put some space between the tabs and the body */
-af|showOneTab::body
-{
-  padding: 10px;
-}
-
-/** panelPage's footer area **/
-/** ----------------------- **/
-.AFFooterMessageText:alias
-{
-  padding:2px 6px;
-}
-
-/** menuTabs **/
-/** -------- **/
-/** You can create borders, and have image-free tabs, or you can use the
-    icon keys (e.g., af|menuTabs::selected-start-icon)to create tabs with
-    rounded borders. The icons are used below,
-    but you can comment them out if you want. */
-/** this isn't needed when we are using icons for the tabs(but the padding helps!)
-.AFTabBarItem:alias
-{
-  border-style:solid; 
-  border-color:#5D025E;
-  border-width: 3px 2px 0px 2px;
-  padding:2px 6px;
-  background-color: Purple;
-}
-**/
-.AFTabBarItem:alias
-{
-  line-height:100%;
-  padding:2px 6px;
-}
-/* Remove the text decoration from all tabBar links  */
-.AFTabBarLink:alias
-{
-  text-decoration:none;
-}
-/* Make the selected tab bold */
-af|menuTabs::selected-link
-{
-  font-weight: bold;
-  font-size: 14pt;
-  color: white;
-}
-af|menuTabs::enabled-link
-{
-  color: white;
-}
-
-af|menuTabs::enabled-link:hover
-{
-  -ora-rule-ref:selector(".MyLinkHoverColor:alias");
-}
-
-
-/** menuTabs that use icons are define like the following */
-af|menuTabs::enabled-start-icon
-{
-  content:url(/skins/purple/images/menuTabsEnabledStart.gif); width:8px; height: 26px;
-}
-af|menuTabs::enabled-start-icon:rtl
-{
-  content:url(/skins/purple/images/menuTabsEnabledEnd.gif); width:8px; height: 26px;
-}
-af|menuTabs::enabled-end-icon
-{
-  content:url(/skins/purple/images/menuTabsEnabledEnd.gif); width:8px; height: 26px;
-}
-af|menuTabs::enabled-end-icon:rtl
-{
-  content:url(/skins/purple/images/menuTabsEnabledStart.gif); width:8px; height: 26px;
-}
-af|menuTabs::enabled-join-icon
-{
-  content:url(/skins/purple/images/menuTabsEnabledJoin.gif); width:15px; height: 26px;
-}
-af|menuTabs::enabled-background-icon
-{
-  content:url(/skins/purple/images/menuTabsEnabledBackgroundGrdt.gif); width:1px; height: 26px;
-}
-
-af|menuTabs::selected-enabled-join-icon
-{
-  content:url(/skins/purple/images/menuTabsSelectedEnabledJoin.gif); width:15px; height: 26px;
-}
-af|menuTabs::selected-enabled-join-icon:rtl
-{
-  content:url(/skins/purple/images/menuTabsEnabledSelectedJoin.gif); width:15px; height: 26px;
-}
-af|menuTabs::enabled-selected-join-icon
-{
-  content:url(/skins/purple/images/menuTabsEnabledSelectedJoin.gif); width:15px; height: 26px;
-}
-af|menuTabs::enabled-selected-join-icon:rtl
-{
-  content:url(/skins/purple/images/menuTabsSelectedEnabledJoin.gif); width:15px; height: 26px;
-}
-
-
-af|menuTabs::selected-start-icon
-{
-  content:url(/skins/purple/images/menuTabsSelectedStart.gif); width:8px; height: 26px;
-}
-af|menuTabs::selected-start-icon:rtl
-{
-  content:url(/skins/purple/images/menuTabsSelectedEnd.gif); width:8px; height: 26px;
-}
-af|menuTabs::selected-end-icon
-{
-  content:url(/skins/purple/images/menuTabsSelectedEnd.gif); width:8px; height: 26px;
-}
-af|menuTabs::selected-end-icon:rtl
-{
-  content:url(/skins/purple/images/menuTabsSelectedStart.gif); width:8px; height: 26px;
-}
-
-af|menuTabs::selected-join-icon
-{
-  content:url(/skins/purple/images/menuTabsSelectedJoin.gif); width:15px; height: 26px;
-}
-af|menuTabs::selected-join-icon
-{
-  content:url(/skins/purple/images/menuTabSelectedJoin.gif); width:15px; height: 26px;
-}
-af|menuTabs::selected-background-icon
-{
-  content:url(/skins/purple/images/menuTabsSelectedBackground.gif); width:1px; height: 26px;
-}
-/** menuBar **/
-/** ------- **/
-af|menuBar
-{
-  border-width: 3px 2px 0px 2px;
-  border-style:solid;
-  -ora-rule-ref:selector(".AFDarkBorder:alias");
-  padding: 12px;
-}
-
-af|menuBar::selected-link
-{
-  font-weight:bold;
-}
-af|menuBar::enabled-link:hover
-{
-  -ora-rule-ref:selector(".MyLinkHoverColor:alias");
-}
-af|menuBar::separator
-{
-    padding: 0px 2px 0px 2px;
-}
-
-/** menuButtons **/
-/** ----------- **/
-.AFMenuButtons:alias
-{
-  padding:0px 2px 2px 4px;
-}
-
-/** panelBox **/
-/*  ------------   */
-
-af|panelBox::medium-header-start-icon
-{
-  content:url(/skins/purple/images/panelBoxStart.gif); 
-  width:8px; 
-  height:26px
-}
-af|panelBox::medium-header-end-icon
-{
-  content:url(/skins/purple/images/panelBoxEnd.gif);
-  width:8px; 
-  height:26px  
-}
-
-.AFPanelBoxBody:alias
-{
-  background-color: #E7E4EA;
-  border-color: purple;
-  border-style:solid;
-  border-width:3px;
-  margin:2px;
-}
-
-af|panelBox::header
-{
-  padding: 3px 3px;
-  -ora-rule-ref: selector(".AFMediumFont:alias");
-  font-weight: bold;
-}
-/* for panelBox without a header and shuttles */
-.AFBoxContentBody:alias
-{
-  background-color: white;
-  border-color: #E7E4EA;
-  border-style:solid;
-  border-width:3px;
-  margin:2px; 
-  padding:5px;
-}
-
-/** panelHeader **/
-/** ----------- **/
-af|panelHeader
-{
-  -ora-rule-ref:selector(".AFDarkAccentBorder:alias");
-   border-width:0px 0px 1px 0px;
-   border-style:solid;
-   vertical-align:bottom;
-   margin-bottom:3px;
-   padding:0px 3px;
-   font-weight:bolder;
-   font-size:larger;
-}
-
-/** selectInputDate launch icon **/
-af|selectInputDate::launch-icon
-{
-  content:url(/skins/purple/images/dateButtonPurple.gif); 
-  width:19px; 
-  height:24px
-}
-af|selectInputDate::launch-icon:rtl
-{
-  content:url(/skins/purple/images/dateButtonPurpleRTL.gif); 
-  width:19px; 
-  height:24px
-}
-
-/** processTrain **/
-/** ------------ **/
-/**  We override the AFTrainStation alias style to add some
-       padding, and also to display the station indicator
-       using a top border **/
-.AFTrainStation:alias
-{
-  border-style:solid;
-  border-width:3px 0px 0px 0px;
-  padding:3pt;
-}
-af|processTrain::visited af|processTrain::link
-{
-  color: Fuchsia;
-}
-
-/** selectBooleanCheckbox **/
-/** ---------------------  **/
-af|selectBooleanCheckbox::read-only-unchecked-icon
-{
-  content:url(/skins/purple/images/checkrn.gif);
-}
-af|selectBooleanCheckbox::read-only-checked-icon
-{
-  content:url(/skins/purple/images/checkrc.gif);
-}
-
-af|selectBooleanCheckbox::disabled-only-unchecked-icon
-{
-  content:url(/skins/purple/images/checkdn.gif);
-}
-af|selectBooleanCheckbox::disabled-only-checked-icon
-{
-  content:url(/skins/purple/images/checkdc.gif);
-}
-
-/* use special properties to change the ui **/
-/* don't show the last item in navigationPath (the default is to show it)*/
-
-af|navigationPath {-ora-show-last-item:false}
-
-af|navigationPath::step {color: purple;}
-af|navigationPath::step:hover {color: green}
-af|navigationPath::selected-step:hover {color: green;}
-
-af|treeTable::path-step {color: purple; text-decoration:none}
-af|treeTable::path-step:hover {color: green}
-af|treeTable::path-selected-step:hover {color: green;}
-
-
-/** if, for some reason, you don't want an icon to show up, you
-    can hide it like this (this feature will be more useful when skins can
-    extends other skins besides simple)
-
-af|navigationPath::separator-icon {content:inhibit}    
-*/
-
-.AFHeaderErrorIcon:alias 
-{
-  content:url(/skins/purple/images/errorl.gif); width:18px; height: 18px;
-
-}
-
-af|messages
-{
-  -ora-rule-ref: selector("AFVeryDarkAccentBorder:alias");
-  border-style:solid;
-  border-width:1px;
-  padding:5px;
-  margin:5px 0px 0px;
-}
-
-af|messages::header
-{
-  -ora-rule-ref: selector("AFDarkAccentBorder:alias");
-  border-width:0px 0px 1px 0px;
-  border-style:solid;
-  vertical-align:bottom;
-  margin-bottom:3px;
-  padding:0px 3px;
-}
-
-.AFHeaderText:alias
-{
-  -ora-rule-ref: selector("AFDarkForeground:alias");
-  font-weight:bold;
-  padding: 0px;
-  margin: 0px;
-}
-
-/* custom styles that I made up and set on the styleClass attribute of various
-adf faces components */
-.adfFacesDemoSearchPanelGroup
-{
-  width:100%;
-  background-color:#B1A9BC;
-  padding:8px 0px 8px 12px;
-  border-color:purple;border-style:solid; border-width:2px;
-}
-
-
-.welcomePanel
-{
-  padding-left:0px;
-  width:100%;
-  background-color:#E7E4EA;
-  margin-bottom:10px;
-  padding-bottom:10px;
-  padding-top:10px;
-  text-align:center;
-
-}
-.panelBoxHeader
-{
-  font-family: verdana,arial,helvetica,sans-serif; 
-  color:#035D5C;
-  font-weight:bold; 
-  font-size:small;
-}
-
-af|chooseDate::prev-icon 
-{
-  content:url(/skins/purple/images/prev.png); width:11px; height: 15px;
-}
-
-af|chooseDate::next-icon 
-{
-  content:url(/skins/purple/images/next.png); width:11px; height: 15px;
-}
-
-af|chooseDate::prev-disabled-icon 
-{
-  content:url(/skins/purple/images/prevDisabled.png); width:11px; height: 15px;
-}
-
-af|chooseDate::next-disabled-icon 
-{
-  content:url(/skins/purple/images/nextDisabled.png); width:11px; height: 15px;
-}
-
-af|objectSeparator
-{
-  -ora-rule-ref: selector(".AFDarkBorder:alias");
-  border-style: dashed none none;
-  border-width: 1px 0px 0px;
-  height: 1px;
-  padding: 0px;
+
+/** Change the colors to purple **/
+
+/** All these styles/icons/properties are overrides of the simple skin */
+
+/** :alias means that this class or icon is not used directly. It is included
+in other component's style selectors or other component's icons. It is 
+meant to be a fast way to change styles. The alternative is to style each 
+component. **/
+.AFInstructionText
+{
+  font-size: medium;
+}
+
+.AFDarkForeground:alias {color:#035D5C;}
+.AFDarkBackground:alias {background-color:Purple;}
+/** In the base styles, AFDarkBorder uses the background-color of 
+    AFDarkBackground for its border color, so no need to set it directly. */
+    
+/* make up a color for hovering over menuTabs and menuBars */
+/* put the extension :alias so it won't get written out to the final css file,
+   cuz I know it won't be used directly. Instead it will be included in
+   other style definions using the -ora-rule-ref property. */
+.MyLinkHoverColor:alias { color:Lime; }
+
+
+/* a teal color */
+.AFLinkForeground:alias {color:#008080}
+
+/** BUTTON STYLES. Notice the right to left icons are specified with the
+:rtl pseudo-class. If :rtl icons are not specified, we default to non-:rtl icons. **/
+
+/** use this to color the button background and text **/
+.AFButtonServerText:alias {background-color:#CECFCE; color:#25009E}
+/* antialias the text for our disabled buttons */
+.AFButtonServerTextDisabled:alias {background-color:#F0F0F0; color:gray;-ora-text-antialias:true}
+
+
+.AFButtonStartIcon:alias {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
+
+.AFButtonStartIcon:alias:rtl {content:url(/skins/purple/images/btne.gif); width:7px; height:18px}
+
+.AFButtonEndIcon:alias {content:url(/skins/purple/images/btne.gif); width:7px; height:18px}
+.AFButtonEndIcon:alias:rtl {content:url(/skins/purple/images/btns.gif); width:7px; height:18px}
+
+.AFButtonTopBackgroundIcon:alias {content:url(/skins/purple/images/btntb.gif); width:1px; height:2px}
+.AFButtonTopBackgroundIcon:alias:rtl {content:url(/skins/purple/images/btntb.gif); width:1px; height:2px}
+
+.AFButtonBottomBackgroundIcon:alias {content:url(/skins/purple/images/btnbb.gif); width:1px; height:2px}
+.AFButtonBottomBackgroundIcon:alias:rtl {content:url(/skins/purple/images/btnbb.gif); width:1px; height:2px}
+
+.AFButtonDisabledStartIcon:alias {content:url(/skins/purple/images/btnds.gif); width:7px; height:18px}
+.AFButtonDisabledStartIcon:alias:rtl {content:url(/skins/purple/images/btnde.gif); width:7px; height:18px}
+.AFButtonDisabledEndIcon:alias {content:url(/skins/purple/images/btnde.gif); width:7px; height:18px}
+.AFButtonDisabledEndIcon:alias:rtl {content:url(/skins/purple/images/btnds.gif); width:7px; height:18px}
+
+.AFButtonDisabledTopBackgroundIcon:alias {content:url(/skins/purple/images/btndtb.gif); width:1px; height:2px}
+
+.AFButtonDisabledBottomBackgroundIcon:alias {content:url(/skins/purple/images/btndbb.gif); width:1px; height:2px}
+
+/** generic background for light panelBox's or shuttles **/
+.AFBoxBackground:alias {background-color:#E3E1E1;}
+
+/** when the panelBox is dark, this is the background color */
+.AFPanelBoxDarkBackground:alias {background-color:green}
+
+/** showOneTab **/
+/** ---------- **/
+/** .AFShowOneTab:alias is included in af|showOneTab::orientation-top and 
+    af|showOneTab::orientation-bottom which are the styles on the table. **/
+.AFShowOneTab:alias {
+  background-color:#BB95BB; 
+  text-align:center;
+}
+/** make the top tab bar have a solid border underneath **/
+af|showOneTab::orientation-top
+{
+  border-bottom: 3px solid black;
+}
+/** make the bottom tab bar have a solid border on top **/
+af|showOneTab::orientation-bottom
+{
+  border-top: 3px solid black;
+}
+
+af|showOneTab::separator {
+  margin-width:4px;
+  border-top: #BB95BB; solid 4pt ;
+  border-bottom: #BB95BB; solid 4pt ;
+  BACKGROUND-COLOR: white;
+  PADDING-LEFT: 1px;}
+
+af|showOneTab::tab {
+  font-weight:bold;
+  font-family:Tahoma; 
+  padding:2px 8px;
+}
+
+af|showOneTab::tab-selected {
+  font-family:Tahoma;
+  padding:2px 8px; 
+  text-decoration: none; 
+  background-color:white
+}  
+
+af|showOneTab::tab-link {
+  color:white;
+  text-decoration: none;
+}
+
+af|showOneTab::tab-link:hover
+{
+  -ora-rule-ref:selector(".MyLinkHoverColor:alias");
+}
+
+/* put some space in the
+first cell */
+af|showOneTab::cell-start {
+  background-color:transparent; 
+  padding-left:10px
+}
+/** put some space between the tabs and the body */
+af|showOneTab::body
+{
+  padding: 10px;
+}
+
+/** panelPage's footer area **/
+/** ----------------------- **/
+.AFFooterMessageText:alias
+{
+  padding:2px 6px;
+}
+
+/** menuTabs **/
+/** -------- **/
+/** You can create borders, and have image-free tabs, or you can use the
+    icon keys (e.g., af|menuTabs::selected-start-icon)to create tabs with
+    rounded borders. The icons are used below,
+    but you can comment them out if you want. */
+/** this isn't needed when we are using icons for the tabs(but the padding helps!)
+.AFTabBarItem:alias
+{
+  border-style:solid; 
+  border-color:#5D025E;
+  border-width: 3px 2px 0px 2px;
+  padding:2px 6px;
+  background-color: Purple;
+}
+**/
+.AFTabBarItem:alias
+{
+  line-height:100%;
+  padding:2px 6px;
+}
+/* Remove the text decoration from all tabBar links  */
+.AFTabBarLink:alias
+{
+  text-decoration:none;
+}
+/* Make the selected tab bold */
+af|menuTabs::selected-link
+{
+  font-weight: bold;
+  font-size: 14pt;
+  color: white;
+}
+af|menuTabs::enabled-link
+{
+  color: white;
+}
+
+af|menuTabs::enabled-link:hover
+{
+  -ora-rule-ref:selector(".MyLinkHoverColor:alias");
+}
+
+
+/** menuTabs that use icons are define like the following */
+af|menuTabs::enabled-start-icon
+{
+  content:url(/skins/purple/images/menuTabsEnabledStart.gif); width:8px; height: 26px;
+}
+af|menuTabs::enabled-start-icon:rtl
+{
+  content:url(/skins/purple/images/menuTabsEnabledEnd.gif); width:8px; height: 26px;
+}
+af|menuTabs::enabled-end-icon
+{
+  content:url(/skins/purple/images/menuTabsEnabledEnd.gif); width:8px; height: 26px;
+}
+af|menuTabs::enabled-end-icon:rtl
+{
+  content:url(/skins/purple/images/menuTabsEnabledStart.gif); width:8px; height: 26px;
+}
+af|menuTabs::enabled-join-icon
+{
+  content:url(/skins/purple/images/menuTabsEnabledJoin.gif); width:15px; height: 26px;
+}
+af|menuTabs::enabled-background-icon
+{
+  content:url(/skins/purple/images/menuTabsEnabledBackgroundGrdt.gif); width:1px; height: 26px;
+}
+
+af|menuTabs::selected-enabled-join-icon
+{
+  content:url(/skins/purple/images/menuTabsSelectedEnabledJoin.gif); width:15px; height: 26px;
+}
+af|menuTabs::selected-enabled-join-icon:rtl
+{
+  content:url(/skins/purple/images/menuTabsEnabledSelectedJoin.gif); width:15px; height: 26px;
+}
+af|menuTabs::enabled-selected-join-icon
+{
+  content:url(/skins/purple/images/menuTabsEnabledSelectedJoin.gif); width:15px; height: 26px;
+}
+af|menuTabs::enabled-selected-join-icon:rtl
+{
+  content:url(/skins/purple/images/menuTabsSelectedEnabledJoin.gif); width:15px; height: 26px;
+}
+
+
+af|menuTabs::selected-start-icon
+{
+  content:url(/skins/purple/images/menuTabsSelectedStart.gif); width:8px; height: 26px;
+}
+af|menuTabs::selected-start-icon:rtl
+{
+  content:url(/skins/purple/images/menuTabsSelectedEnd.gif); width:8px; height: 26px;
+}
+af|menuTabs::selected-end-icon
+{
+  content:url(/skins/purple/images/menuTabsSelectedEnd.gif); width:8px; height: 26px;
+}
+af|menuTabs::selected-end-icon:rtl
+{
+  content:url(/skins/purple/images/menuTabsSelectedStart.gif); width:8px; height: 26px;
+}
+
+af|menuTabs::selected-join-icon
+{
+  content:url(/skins/purple/images/menuTabsSelectedJoin.gif); width:15px; height: 26px;
+}
+af|menuTabs::selected-join-icon
+{
+  content:url(/skins/purple/images/menuTabSelectedJoin.gif); width:15px; height: 26px;
+}
+af|menuTabs::selected-background-icon
+{
+  content:url(/skins/purple/images/menuTabsSelectedBackground.gif); width:1px; height: 26px;
+}
+/** menuBar **/
+/** ------- **/
+af|menuBar
+{
+  border-width: 3px 2px 0px 2px;
+  border-style:solid;
+  -ora-rule-ref:selector(".AFDarkBorder:alias");
+  padding: 12px;
+}
+
+af|menuBar::selected-link
+{
+  font-weight:bold;
+}
+af|menuBar::enabled-link:hover
+{
+  -ora-rule-ref:selector(".MyLinkHoverColor:alias");
+}
+af|menuBar::separator
+{
+    padding: 0px 2px 0px 2px;
+}
+
+/** menuButtons **/
+/** ----------- **/
+.AFMenuButtons:alias
+{
+  padding:0px 2px 2px 4px;
+}
+
+/** panelBox **/
+/*  ------------   */
+
+af|panelBox::medium-header-start-icon
+{
+  content:url(/skins/purple/images/panelBoxStart.gif); 
+  width:8px; 
+  height:26px
+}
+af|panelBox::medium-header-end-icon
+{
+  content:url(/skins/purple/images/panelBoxEnd.gif);
+  width:8px; 
+  height:26px  
+}
+
+.AFPanelBoxBody:alias
+{
+  background-color: #E7E4EA;
+  border-color: purple;
+  border-style:solid;
+  border-width:3px;
+  margin:2px;
+}
+
+af|panelBox::header
+{
+  padding: 3px 3px;
+  -ora-rule-ref: selector(".AFMediumFont:alias");
+  font-weight: bold;
+}
+/* for panelBox without a header and shuttles */
+.AFBoxContentBody:alias
+{
+  background-color: white;
+  border-color: #E7E4EA;
+  border-style:solid;
+  border-width:3px;
+  margin:2px; 
+  padding:5px;
+}
+
+/** panelHeader **/
+/** ----------- **/
+af|panelHeader
+{
+  -ora-rule-ref:selector(".AFDarkAccentBorder:alias");
+   border-width:0px 0px 1px 0px;
+   border-style:solid;
+   vertical-align:bottom;
+   margin-bottom:3px;
+   padding:0px 3px;
+   font-weight:bolder;
+   font-size:larger;
+}
+
+/** selectInputDate launch icon **/
+af|selectInputDate::launch-icon
+{
+  content:url(/skins/purple/images/dateButtonPurple.gif); 
+  width:19px; 
+  height:24px
+}
+af|selectInputDate::launch-icon:rtl
+{
+  content:url(/skins/purple/images/dateButtonPurpleRTL.gif); 
+  width:19px; 
+  height:24px
+}
+
+/** processTrain **/
+/** ------------ **/
+/**  We override the AFTrainStation alias style to add some
+       padding, and also to display the station indicator
+       using a top border **/
+.AFTrainStation:alias
+{
+  border-style:solid;
+  border-width:3px 0px 0px 0px;
+  padding:3pt;
+}
+af|processTrain::visited af|processTrain::link
+{
+  color: Fuchsia;
+}
+
+/** selectBooleanCheckbox **/
+/** ---------------------  **/
+af|selectBooleanCheckbox::read-only-unchecked-icon
+{
+  content:url(/skins/purple/images/checkrn.gif);
+}
+af|selectBooleanCheckbox::read-only-checked-icon
+{
+  content:url(/skins/purple/images/checkrc.gif);
+}
+
+af|selectBooleanCheckbox::disabled-only-unchecked-icon
+{
+  content:url(/skins/purple/images/checkdn.gif);
+}
+af|selectBooleanCheckbox::disabled-only-checked-icon
+{
+  content:url(/skins/purple/images/checkdc.gif);
+}
+
+/* use special properties to change the ui **/
+/* don't show the last item in navigationPath (the default is to show it)*/
+
+af|navigationPath {-ora-show-last-item:false}
+
+af|navigationPath::step {color: purple;}
+af|navigationPath::step:hover {color: green}
+af|navigationPath::selected-step:hover {color: green;}
+
+af|treeTable::path-step {color: purple; text-decoration:none}
+af|treeTable::path-step:hover {color: green}
+af|treeTable::path-selected-step:hover {color: green;}
+
+
+/** if, for some reason, you don't want an icon to show up, you
+    can hide it like this (this feature will be more useful when skins can
+    extends other skins besides simple)
+
+af|navigationPath::separator-icon {content:inhibit}    
+*/
+
+.AFHeaderErrorIcon:alias 
+{
+  content:url(/skins/purple/images/errorl.gif); width:18px; height: 18px;
+
+}
+
+af|messages
+{
+  -ora-rule-ref: selector("AFVeryDarkAccentBorder:alias");
+  border-style:solid;
+  border-width:1px;
+  padding:5px;
+  margin:5px 0px 0px;
+}
+
+af|messages::header
+{
+  -ora-rule-ref: selector("AFDarkAccentBorder:alias");
+  border-width:0px 0px 1px 0px;
+  border-style:solid;
+  vertical-align:bottom;
+  margin-bottom:3px;
+  padding:0px 3px;
+}
+
+.AFHeaderText:alias
+{
+  -ora-rule-ref: selector("AFDarkForeground:alias");
+  font-weight:bold;
+  padding: 0px;
+  margin: 0px;
+}
+
+/* custom styles that I made up and set on the styleClass attribute of various
+adf faces components */
+.adfFacesDemoSearchPanelGroup
+{
+  width:100%;
+  background-color:#B1A9BC;
+  padding:8px 0px 8px 12px;
+  border-color:purple;border-style:solid; border-width:2px;
+}
+
+
+.welcomePanel
+{
+  padding-left:0px;
+  width:100%;
+  background-color:#E7E4EA;
+  margin-bottom:10px;
+  padding-bottom:10px;
+  padding-top:10px;
+  text-align:center;
+
+}
+.panelBoxHeader
+{
+  font-family: verdana,arial,helvetica,sans-serif; 
+  color:#035D5C;
+  font-weight:bold; 
+  font-size:small;
+}
+
+af|chooseDate::prev-icon 
+{
+  content:url(/skins/purple/images/prev.png); width:11px; height: 15px;
+}
+
+af|chooseDate::next-icon 
+{
+  content:url(/skins/purple/images/next.png); width:11px; height: 15px;
+}
+
+af|chooseDate::prev-disabled-icon 
+{
+  content:url(/skins/purple/images/prevDisabled.png); width:11px; height: 15px;
+}
+
+af|chooseDate::next-disabled-icon 
+{
+  content:url(/skins/purple/images/nextDisabled.png); width:11px; height: 15px;
+}
+
+af|objectSeparator
+{
+  -ora-rule-ref: selector(".AFDarkBorder:alias");
+  border-style: dashed none none;
+  border-width: 1px 0px 0px;
+  height: 1px;
+  padding: 0px;
 } 
+
+/* test :rtl for styles */
+.AFEndPadding:alias:rtl
+{
+  padding: 0px 0px 0px 20px;
+}
+af|inputText::content:rtl
+{
+  color: red; 
+}
+af|inputText::label:rtl
+{
+  font-weight:bold;
+}

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/CoreAdfRenderingContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/CoreAdfRenderingContext.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/CoreAdfRenderingContext.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/CoreAdfRenderingContext.java Fri May 26 11:22:38 2006
@@ -250,11 +250,11 @@
     // If we're in right-to-left, and the code asking us hasn't
     // already slapped on a right-to-left suffix, then go looking
     // in right-to-left land
-    if (isRightToLeft() && !iconName.endsWith(_RTL_CSS_SUFFIX))
+    if (isRightToLeft() && !iconName.endsWith(StyleUtils.RTL_CSS_SUFFIX))
     {
       // append :rtl to the mappedIconName. If no icon with that name,
       // default to getting the icon with the original mappedIconName.
-      String rtlIconName = iconName + _RTL_CSS_SUFFIX;
+      String rtlIconName = iconName + StyleUtils.RTL_CSS_SUFFIX;
       Icon rtlIcon = skin.getIcon(rtlIconName);
 
       if ((rtlIcon == null) || rtlIcon.isNull())
@@ -495,8 +495,6 @@
   private Map                _properties = new HashMap();
   private int                _linkStyleDisabledCount = 0;
   private boolean            _isLinkDisabled = false;
-
-  static private final String _RTL_CSS_SUFFIX = ":rtl";
 
   // Maps describing the capabilities of our output modes
   static private final Map _PRINTABLE_CAPABILITIES = new HashMap();

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinCSSDocumentHandler.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinCSSDocumentHandler.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinCSSDocumentHandler.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinCSSDocumentHandler.java Fri May 26 11:22:38 2006
@@ -13,151 +13,274 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.myfaces.adfinternal.skin;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.myfaces.adfinternal.style.xml.parse.PropertyNode;
-
-/** As the Skin css file is parsed, methods in this class are called to
- * build up a SkinStyleSheetNode.
- */
-public class SkinCSSDocumentHandler
-{
-  /**
-   * Return the SkinStyleSheetNode that was created at the end of parsing
-   * the skin css file.
-   */
-  public SkinStyleSheetNode getSkinStyleSheetNode()
-  {
-    return _styleSheet;
-  }
-
-  /**
-   * Call this at the start of parsing the skin css file.
-   */
-  public void startDocument()
-  {
-    _namespaceMap = new HashMap();
-    _selectorPropertiesList = new ArrayList();
-  }
-  
-  /**
-   * Call this at the end of parsing the skin css file.
-   */
-  public void endDocument()
-  {
-    _styleSheet = 
-      new SkinStyleSheetNode(_selectorPropertiesList, _namespaceMap);
-  }
-
-  public void comment(String text)
-  {
-    // ignore comments
-  }
-  
-  /**
-   * Call this at the beginning of parsing one set of selectors/properties.
-   * e.g., .AFDefaultFont, af|navigationPath::font 
-   * {font-family:Arial,Helvetica; font-size:small}
-   */
-  public void startSelector()
-  {
-    _inStyleRule = true;
-    _propertyNodeList = new ArrayList();
-  }
-  
-  /**
-   * Call this at the end of parsing one set of selectors/properties.
-   * @param selectors A List of Strings, each String is a selector.
-   * e.g., given the selectors/properties:
-   * .AFDefaultFont, af|navigationPath::font 
-   * {font-family:Arial,Helvetica; font-size:small}
-   * The selectors are ".AFDefaultFont" and "af|navigationPath::font"
-   */
-  public void endSelector(List selectors)
-  {
-    if (selectors == null)
-      return;
-    int selectorNum = selectors.size();
-    for (int i = 0; i < selectorNum; i++)
-    {
-      String selector = (String)selectors.get(i);
-      _selectorPropertiesList.add(
-        new SkinSelectorPropertiesNode(selector, _propertyNodeList));
-    }
-    _inStyleRule = false;
-    _propertyNodeList = null;
-  }
-
-  /**
-   * Call this when a property name/value is found.
-   * e.g., given the selectors/properties:
-   * .AFDefaultFont, af|navigationPath::font 
-   * {font-family:Arial,Helvetica; font-size:small}
-   * One property name/value pair is "font-family"/"Arial,Helvetica"
-   * @param name 
-   * @param value 
-   */
-  public void property(String name, String value)
-  {
-    if (_inStyleRule && (_propertyNodeList != null))
-    {
-      _propertyNodeList.add(new PropertyNode(name, value));
-    }
-  }
-
-  /**
-   * Call when you have an @ rule. This adds the @ rule to the object's
-   * namespaceMap.
-   * @param name The @rule string, which contains the entire line with the
-   * @ rule, which ends with a semicolon.
-   * e.g., @namespace af url(http:\\www.xxx.com)
-   */
-  public void atRule(String name)
-  {
-    // parse the atRule further here.
-    // name will be something like:
-    // "namespace af url(asdfadfadf)"
-    if (name != null)
-    {
-      if (name.startsWith("@namespace"))
-      {
-        // @todo deal with default namespaces that don't have prefixes??
-        String[] namespaceParts = name.split("\\s+");
-        if (namespaceParts.length > 2)
-        {
-          String url = namespaceParts[2];
-          
-          // first, strip off the url( and );
-          if (url.startsWith("url("))
-            url = url.substring(4);
-          if (url.endsWith(");"))
-            url = url.substring(0, url.length() - 2);
-          else if (url.endsWith(";"))
-            url = url.substring(0, url.length() - 1);
-            
-          // second, strip off the starting/ending quotes if there are any                    
-          url = SkinStyleSheetParserUtils.trimQuotes(url);
-          _namespaceMap.put(namespaceParts[1], url);
-        }
-      }
-    }
-  }
-
-  private boolean _inStyleRule = false;
-
-  private SkinStyleSheetNode _styleSheet = null;
-
-  private List _propertyNodeList = null;
-
-  // a List of SkinSelectorPropertiesNode objects
-  private List _selectorPropertiesList;
-
-  private Map _namespaceMap;
-
-}  
-  
+package org.apache.myfaces.adfinternal.skin;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.myfaces.adfinternal.style.util.StyleUtils;
+import org.apache.myfaces.adfinternal.style.xml.parse.PropertyNode;
+import org.apache.myfaces.adfinternal.util.nls.LocaleUtils;
+
+/** As the Skin css file is parsed, methods in this class are called to
+ * build up a SkinStyleSheetNode.
+ */
+public class SkinCSSDocumentHandler
+{
+ 
+  /**
+   * Return the List of SkinStyleSheetNodes that was created
+   *  at the end of parsing the skin css file (endDocument).
+   */
+  public List <SkinStyleSheetNode> getSkinStyleSheetNodes()
+  {
+    return _skinStyleSheetNodes;  
+  }
+  
+  /**
+   * Call this at the start of parsing the skin css file.
+   */
+  public void startDocument()
+  {
+    _namespaceMap = new HashMap();
+    _completeSelectorNodeList = new ArrayList();
+  }
+  
+  /**
+   * Call this at the end of parsing the skin css file.
+   */
+  public void endDocument()
+  {
+    // We now have a list of CompleteSelectorNodes.
+    // We need to group this list into stylesheet nodes by matching 
+    // the additional information, like direction.
+    // Then we create a list of SkinStyleSheetNodes.
+    _skinStyleSheetNodes = 
+      _createSkinStyleSheetNodes(_completeSelectorNodeList, _namespaceMap);
+  }
+
+  public void comment(String text)
+  {
+    // ignore comments
+  }
+  
+  /**
+   * Call this at the beginning of parsing one set of selectors/properties.
+   * e.g., .AFDefaultFont, af|navigationPath::font 
+   * {font-family:Arial,Helvetica; font-size:small}
+   */
+  public void startSelector()
+  {
+    _inStyleRule = true;
+    _propertyNodeList = new ArrayList();
+  }
+  
+  /**
+   * Call this at the end of parsing one set of selectors/properties.
+   * @param selectors A List of Strings, each String is a selector.
+   * e.g., given the selectors/properties:
+   * .AFDefaultFont, af|navigationPath::font 
+   * {font-family:Arial,Helvetica; font-size:small}
+   * The selectors are ".AFDefaultFont" and "af|navigationPath::font"
+   */
+  public void endSelector(List selectors)
+  {
+    if (selectors == null)
+      return;
+    int selectorNum = selectors.size();
+    for (int i = 0; i < selectorNum; i++)
+    {
+      String selector = (String)selectors.get(i);
+      CompleteSelectorNode node =
+        _createCompleteSelectorNode(selector, _propertyNodeList);
+      _completeSelectorNodeList.add(node);
+    }
+    _inStyleRule = false;
+    _propertyNodeList = null;
+  }
+
+  /**
+   * Call this when a property name/value is found.
+   * e.g., given the selectors/properties:
+   * .AFDefaultFont, af|navigationPath::font 
+   * {font-family:Arial,Helvetica; font-size:small}
+   * One property name/value pair is "font-family"/"Arial,Helvetica"
+   * @param name 
+   * @param value 
+   */
+  public void property(String name, String value)
+  {
+    if (_inStyleRule && (_propertyNodeList != null))
+    {
+      _propertyNodeList.add(new PropertyNode(name, value));
+    }
+  }
+
+  /**
+   * Call when you have an @ rule. This adds the @ rule to the object's
+   * namespaceMap.
+   * @param name The @rule string, which contains the entire line with the
+   * @ rule, which ends with a semicolon.
+   * e.g., @namespace af url(http:\\www.xxx.com)
+   */
+  public void atRule(String name)
+  {
+    // parse the atRule further here.
+    // name will be something like:
+    // "namespace af url(asdfadfadf)"
+    if (name != null)
+    {
+      if (name.startsWith("@namespace"))
+      {
+        // @todo deal with default namespaces that don't have prefixes??
+        String[] namespaceParts = name.split("\\s+");
+        if (namespaceParts.length > 2)
+        {
+          String url = namespaceParts[2];
+          
+          // first, strip off the url( and );
+          if (url.startsWith("url("))
+            url = url.substring(4);
+          if (url.endsWith(");"))
+            url = url.substring(0, url.length() - 2);
+          else if (url.endsWith(";"))
+            url = url.substring(0, url.length() - 1);
+            
+          // second, strip off the starting/ending quotes if there are any                    
+          url = SkinStyleSheetParserUtils.trimQuotes(url);
+          _namespaceMap.put(namespaceParts[1], url);
+        }
+      }
+    }
+  }
+
+  // create a CompleteSelectorNode (this is the selector, properties, and
+  // additional info, like 'rtl' direction
+  private CompleteSelectorNode _createCompleteSelectorNode(
+    String selector, 
+    List  propertyNodeList)
+  {
+    // parse the selector to see if there is a :rtl or :ltr ending.
+    // if so, then set the reading direction.
+    int direction = LocaleUtils.DIRECTION_DEFAULT;
+    if (selector.endsWith(StyleUtils.RTL_CSS_SUFFIX))
+    {
+      int length = StyleUtils.RTL_CSS_SUFFIX.length();
+      // strip off the SUFFIX  
+      selector = selector.substring(0, selector.length()-length);
+      direction = LocaleUtils.DIRECTION_RIGHTTOLEFT;
+    }
+    else if (selector.endsWith(StyleUtils.LTR_CSS_SUFFIX))
+    {
+      int length = StyleUtils.LTR_CSS_SUFFIX.length();
+      // strip off the SUFFIX  
+      selector = selector.substring(0, selector.length()-length);
+      direction = LocaleUtils.DIRECTION_LEFTTORIGHT;
+    }
+
+    return 
+      new CompleteSelectorNode(selector, propertyNodeList, direction);
+  }
+
+  /**
+   * Given a List of CompleteSelectorNodes, we create a List of 
+   * SkinStyleSheetNodes. We do this by looping through each
+   * CompleteSeletcorNode and finding the SkinStyleSheetNode with matching
+   * direction attribute (someday we'll add locale, browser, etc), or 
+   * creaing a new SkinStyleSheetNode if a matching one doesn't exist.
+   * @param selectorList a list of CompleteSelectorNodes.
+   * @param namespaceMap the namespace map
+   * @return a List of SkinStyleSheetNodes
+   */
+  private List <SkinStyleSheetNode> _createSkinStyleSheetNodes(
+    List <CompleteSelectorNode> selectorList, 
+    Map namespaceMap)
+  {  
+    List <SkinStyleSheetNode> ssNodeList = new ArrayList();
+    // to start with ssNodeList is empty
+    // for each selector node, look to see if we can find a SkinStyleSheetNode
+    // that it belongs to (by matching direction).
+    // if not, create a new ssNode, and add it to the ssNodeList, and
+    // add the selector node to the ssNode.
+    
+    for (CompleteSelectorNode completeSelectorNode : selectorList) 
+    {
+       // we add to the ssNodeList in this method.
+        int direction = completeSelectorNode.getDirection();
+        // loop through the skinStyleSheetNodeList to find a match
+        boolean match = false;
+        for (SkinStyleSheetNode ssNode : ssNodeList) 
+        {
+            int ssNodeDirection = ssNode.getDirection();
+            if (ssNodeDirection == direction)
+            {
+              // got a match! use this one to add the selector node to.
+              ssNode.add(completeSelectorNode.getSkinSelectorPropertiesNode());
+              match = true;
+              break;
+            }        
+        }
+        if (!match)
+        {
+          // no matching stylesheet node found, so create a new one
+           SkinStyleSheetNode ssNode = 
+            new SkinStyleSheetNode(namespaceMap, direction);
+           ssNode.add(completeSelectorNode.getSkinSelectorPropertiesNode());
+           // add the ssNode to the ssNodeList
+           ssNodeList.add(ssNode);
+        }
+           
+    }
+     
+    return ssNodeList;
+     
+  }
+
+  /**
+   * This Class contains a SkinSelectorPropertiesNode and a rtl direction.
+   * We will use this information when creating a SkinStyleSheetNode.
+   */
+  private static class CompleteSelectorNode
+  {
+    public CompleteSelectorNode(
+      String selectorName,
+      List   propertyNodes,
+      int    direction
+      )
+    {
+      _node = new SkinSelectorPropertiesNode(selectorName, propertyNodes);
+      _direction = direction;
+    }
+    
+    public SkinSelectorPropertiesNode getSkinSelectorPropertiesNode()
+    {
+      return _node;
+    }
+    
+    public int getDirection()
+    {
+      return _direction;
+    }
+    
+    private SkinSelectorPropertiesNode _node;
+    private int _direction;  // the reading direction
+  }
+  
+  private boolean _inStyleRule = false;
+ 
+  private List <SkinStyleSheetNode> _skinStyleSheetNodes = null;
+
+  private List _propertyNodeList = null;
+
+  // we build this list in this document handler. We use this 
+  // list to create a list of 
+  // SkinStyleSheetNodes and SkinSelectorPropertiesNodes
+  private List <CompleteSelectorNode> _completeSelectorNodeList;
+
+  private Map _namespaceMap;
+
+}  
+  
   

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinSelectorPropertiesNode.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinSelectorPropertiesNode.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinSelectorPropertiesNode.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinSelectorPropertiesNode.java Fri May 26 11:22:38 2006
@@ -20,9 +20,10 @@
 
 /**
  * Stores each selector and its properties that
- * was found in the css file. This is similar to StyleNode + StyleSheetNode
- * for the xss files. We'll separate out, too, when we have it full-featured to
- * include locales, direction, lang, etc.
+ * was found in the css file. This is similar to StyleNode
+ * for the xss files. 
+ * We turn this information into a StyleSheetDocument in 
+ * SkinStyleSheetParserUtils.java
  * We might want to add things like imports, so they can at least import other
  * css files if they care to. ??
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/skin/SkinSelectorPropertiesNode.java#0 $) $Date: 10-nov-2005.18:58:58 $
@@ -37,10 +38,10 @@
       List   propertyNodes
       )
     {
-      _selectorName= selectorName;
-      _propertyNodes= propertyNodes;
+      _selectorName  = selectorName;
+      _propertyNodes = propertyNodes;
     }
-    
+   
     public String getSelectorName()
     {
       return _selectorName;
@@ -49,7 +50,7 @@
     {
       return _propertyNodes;
     }
-
+  
     private String _selectorName;
     private List   _propertyNodes;
 

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetNode.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetNode.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetNode.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetNode.java Fri May 26 11:22:38 2006
@@ -16,11 +16,12 @@
 
 package org.apache.myfaces.adfinternal.skin;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
 /** Stores information about the .css skin file.
- * namespaceMap and a List of SkinSelectorPropertiesNodes.
+ * namespaceMap, a List of SkinSelectorPropertiesNodes, and direction.
  * @todo honor the namespaces that are set in the css file. For now, we ignore
  * them. We need to honor them for icons, properties, and styles at the same
  * time so they are consistent. By honoring, I mean if the namespace is
@@ -33,20 +34,35 @@
  */
 class SkinStyleSheetNode
 {
-    /**
-   * Constructor
-   * @param skinSelectorNodeList List of SkinSelectorPropertiesNodes
-   * @param namespaceMap Map of namespace prefix/values.
-   */
+    
     SkinStyleSheetNode(
       List <SkinSelectorPropertiesNode> skinSelectorNodeList,
-      Map  namespaceMap     
+      Map  namespaceMap,
+      int  direction
       )
     {
       _skinSelectorNodeList = skinSelectorNodeList;
       _namespaceMap     = namespaceMap;
-    }
+      _direction        = direction;
+    } 
     
+  
+  SkinStyleSheetNode(
+    Map  namespaceMap,
+    int  direction
+    )
+  {
+    _namespaceMap     = namespaceMap;
+    _direction        = direction;
+  }     
+    
+  public void add(SkinSelectorPropertiesNode node)
+  {
+    if (_skinSelectorNodeList == null)
+      _skinSelectorNodeList = new ArrayList();
+    _skinSelectorNodeList.add(node);
+  } 
+  
     /**
    * 
    * @return Map containing Strings keys/values of namespace prefix and 
@@ -65,8 +81,21 @@
     {
       return _skinSelectorNodeList;
     }
+    
+    /**
+    *
+    * @return int indicating the direction
+    * LocaleUtils.DIRECTION_DEFAULT 
+    * LocaleUtils.DIRECTION_LEFTTORIGHT 
+    * LocaleUtils.DIRECTION_RIGHTTOLEFT
+    */
+    public int getDirection()
+    {
+      return _direction;
+    }    
 
     private Map  _namespaceMap;
     private List <SkinSelectorPropertiesNode> _skinSelectorNodeList;
+    private int _direction;  // reading direction
 
 }

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetParserUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetParserUtils.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetParserUtils.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/skin/SkinStyleSheetParserUtils.java Fri May 26 11:22:38 2006
@@ -48,8 +48,10 @@
 import org.apache.myfaces.adfinternal.skin.icon.Icon;
 import org.apache.myfaces.adfinternal.skin.icon.TextIcon;
 import org.apache.myfaces.adfinternal.skin.icon.URIImageIcon;
+import org.apache.myfaces.adfinternal.style.util.StyleUtils;
 import org.apache.myfaces.adfinternal.ui.laf.xml.parse.IconNode;
 import org.apache.myfaces.adfinternal.ui.laf.xml.parse.SkinPropertyNode;
+import org.apache.myfaces.adfinternal.util.nls.LocaleUtils;
 
 /**
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/skin/SkinStyleSheetParserUtils.java#0 $) $Date: 10-nov-2005.18:59:00 $
@@ -88,13 +90,6 @@
     if ((cached != null) && expectedType.isInstance(cached))
       return cached;
 
-    // Retrieve the base URI for the source style sheet.
-    // We need this information so that we can convert relative
-    // URLs in the source style sheet (eg. background-image URLs)
-    // to absolute URLs.  Otherwise, the relative URLs would
-    // be resolved relative to the generated style sheet,
-    // which is not the desired behavior.
-    String baseURI = _getBaseURI(sourceName);
 
     InputStream stream = provider.openInputStream();
 
@@ -107,49 +102,118 @@
 
       // PARSE!
       // create a SkinStyleSheetNode
-      // (contains a namespaceMap and a List of SkinSelectorPropertiesNodes)
+      // (contains a namespaceMap and a List of SkinSelectorPropertiesNodes
+      // and additional information like direction, locale, etc.)
       // (selectorName + a css propertyList))
-      BufferedReader in = null;
-      SkinStyleSheetNode styleSheetNode = null;
-
-      in = new BufferedReader(new InputStreamReader(stream));
-      styleSheetNode = _parseCSSStyleSheet(in);
+      BufferedReader in = new BufferedReader(new InputStreamReader(stream));
+      List <SkinStyleSheetNode> skinSSNodeList = _parseCSSStyleSheet(in);
       in.close();
+  
+   
+      // process the SkinStyleSheetNodes to create a StyleSheetEntry object
+      StyleSheetEntry styleSheetEntry = 
+        _createStyleSheetEntry(context, sourceName, skinSSNodeList);
+  
 
-      // selector and its properties
-      List <SkinSelectorPropertiesNode> selectorNodeList =
-        styleSheetNode.getSelectorNodeList();
-      //Map namespaceMap = styleSheetNode.getNamespaceMap();
+      // Store the cached result (if successful)
+      // otherwise, if we don't do this, we will keep reparsing. Somehow
+      // this affects whether the file has been modified. STRANGE!
+      //     if (value != null)
+      //    provider.setCachedResult(value);
 
-      // now go through parsed file which is now a List of
-      // SkinSelectorPropertiesNode objects and create IconNodes,
-      // SkinPropertyNodes, and StyleNodes.
+      //    return value;
+      provider.setCachedResult(styleSheetEntry);
+      
+      return styleSheetEntry;
+    }
+    finally
+    {
+      stream.close();
+    }
+  }
+
+
+    /** trim the leading/ending quotes, if any.
+   * */
+  public static String trimQuotes(String in)
+  {
+    // strip off the starting/ending quotes if there are any
+    char firstChar = in.charAt(0);
+    int firstCharIndex = 0;
+    if ((firstChar == '\'') || (firstChar == '"'))
+      firstCharIndex = 1;
 
-      Iterator e = selectorNodeList.listIterator();
-      List <IconNode> iconNodeList = new ArrayList();
-      List skinPropertyNodeList = new ArrayList();
-      List styleNodeList = new ArrayList();
+    int length = in.length();
+    char lastChar = in.charAt(length-1);
+    if ((lastChar == '\'') || (lastChar == '"'))
+      length--;
 
+    return in.substring(firstCharIndex, length);
+  }
 
+  /**
+   * Given a List of StyleSheetNodes, create StyleSheetEntry.
+   * A StyleSheetEntry is an object that contains:
+   * styleSheetName, StyleSheetDocument, List<IconNode>, List<SkinPropertyNode>
+   * A StyleSheetDocument contains StyleSheetNodes. A StyleSheetNode contains
+   * a list css style selectors and their properties and additional info like
+   * the direction, locale, etc. for this list of selectors.
+   * @param context
+   * @param sourceName
+   * @param styleSheetNodes
+   * @return
+   */
+  private static StyleSheetEntry _createStyleSheetEntry(
+    ParseContext  context,
+    String        sourceName,
+    List <SkinStyleSheetNode> skinSSNodeList
+    )
+  {
 
-      while (e.hasNext())
+    // Retrieve the base URI for the source style sheet.
+    // We need this information so that we can convert relative
+    // URLs in the source style sheet (eg. background-image URLs)
+    // to absolute URLs.  Otherwise, the relative URLs would
+    // be resolved relative to the generated style sheet,
+    // which is not the desired behavior.
+    String baseURI = _getBaseURI(sourceName);    
+    
+    // Get each SkinStyleSheetNode, and for each SkinStyleSheetNode get a
+    // styleNodeList. Also, build one iconNodeList and one skinPropertyNodeList.
+    
+    // initialize
+    List <IconNode> iconNodeList = new ArrayList();
+    List skinPropertyNodeList = new ArrayList();
+    List <StyleSheetNode> ssNodeList = new ArrayList();
+    
+    for (SkinStyleSheetNode skinSSNode : skinSSNodeList) 
+    {
+  
+      // selector and its properties
+      List <SkinSelectorPropertiesNode> selectorNodeList =
+        skinSSNode.getSelectorNodeList();
+      //Map namespaceMap = styleSheetNode.getNamespaceMap();
+     
+      // initialize
+      List <StyleNode> styleNodeList = new ArrayList();
+  
+      for (SkinSelectorPropertiesNode cssSelector : selectorNodeList) 
       {
-        SkinSelectorPropertiesNode cssSelector =
-          (SkinSelectorPropertiesNode) e.next();
 
         String selectorName = cssSelector.getSelectorName();
         List propertyList = cssSelector.getPropertyNodes();
-
+        int direction     = skinSSNode.getDirection();
+  
         ResolvedSkinProperties resolvedProperties =
           _resolveProperties(selectorName,
                              propertyList,
                              baseURI,
                              sourceName);
-
+  
         skinPropertyNodeList.addAll(resolvedProperties.getSkinPropertyNodeList());
-
+  
         List noOraPropertyList = resolvedProperties.getNoOraPropertyList();
-
+  
         // =-=jmw There is no good way to tell if this is an icon.
         // for now, I look at the selector name.
         // we do have some styles that have -icon- in the name, but it's
@@ -157,16 +221,17 @@
         // our icon names look like .AFWarningIcon:alias
         // AFErrorIconStyle is a style.
         if (selectorName.endsWith("-icon")  ||
-            selectorName.endsWith("-icon:rtl") ||
-            selectorName.endsWith("Icon:alias") ||
-            selectorName.endsWith("Icon:alias:rtl"))
+            selectorName.endsWith("Icon:alias"))
         {
           // knock off the '.' if it is the first character.
           if (selectorName.charAt(0) == '.')
             selectorName = selectorName.substring(1);
           // strip out :alias
           selectorName = selectorName.replaceFirst(":alias", "");
-
+          // add :rtl if the direction is rtl
+          if (direction == LocaleUtils.DIRECTION_RIGHTTOLEFT)
+            selectorName = selectorName.concat(StyleUtils.RTL_CSS_SUFFIX);
+  
           // create an IconNode object and add it ot the iconNodeList
           _addIconNode(selectorName,
                        noOraPropertyList,
@@ -180,54 +245,44 @@
                         resolvedProperties.getOraRuleRefList(),
                         resolvedProperties.isOraTextAntialias(),
                         styleNodeList);
-
+  
         }
       }
+      
+      if (styleNodeList.size() > 0)
+      {
+        // we need to deal with the styleNodeList by building a StyleSheetNode
+        // with this information.
+        // create a StyleSheetNode, add to the ssNodeList
+        StyleNode[] styleNodeArray = styleNodeList.toArray(new StyleNode[0]);
+        StyleSheetNode ssNode = 
+          new StyleSheetNode(styleNodeArray,
+                             null,
+                             skinSSNode.getDirection(),
+                             null,
+                             null,
+                             null,
+                             0);
+        ssNodeList.add(ssNode);
+      }
+ 
+    } // end for each SkinStyleSheetNode
+    
+    
+    // StyleSheetDocument contains StyleSheetNode[] styleSheets
+    StyleSheetDocument ssDocument = 
+      _createStyleSheetDocument(context, ssNodeList);
+
+    return new StyleSheetEntry(sourceName,
+                               ssDocument,
+                               iconNodeList,
+                               skinPropertyNodeList);
 
-      StyleSheetDocument document = _buildStyleSheetDocument(context,
-                                                             styleNodeList);
-
-      StyleSheetEntry styleSheet = new StyleSheetEntry(sourceName,
-                                                       document,
-                                                       iconNodeList,
-                                                       skinPropertyNodeList);
 
 
-      // Step 7. Store the cached result (if successful)
-      // otherwise, if we don't do this, we will keep reparsing. Somehow
-      // this affects whether the file has been modified. STRANGE!
- //     if (value != null)
-   //    provider.setCachedResult(value);
-
-  //    return value;
-      provider.setCachedResult(styleSheet);
-
-      return styleSheet;
-    }
-    finally
-    {
-      stream.close();
-    }
   }
 
 
-    /** trim the leading/ending quotes, if any.
-   * */
-  public static String trimQuotes(String in)
-  {
-    // strip off the starting/ending quotes if there are any
-    char firstChar = in.charAt(0);
-    int firstCharIndex = 0;
-    if ((firstChar == '\'') || (firstChar == '"'))
-      firstCharIndex = 1;
-
-    int length = in.length();
-    char lastChar = in.charAt(length-1);
-    if ((lastChar == '\'') || (lastChar == '"'))
-      length--;
-
-    return in.substring(firstCharIndex, length);
-  }
 
   /**
    * Loop thru every property in the propertyList and store them in
@@ -471,7 +526,7 @@
     List    propertyNodeList,
     List    oraRuleRefList,
     boolean oraTextAntialias,
-    List    styleNodeList)
+    List    <StyleNode> styleNodeList)
   {
 
     // these are the styles.
@@ -593,27 +648,14 @@
     }
   }
 
-  private static StyleSheetDocument _buildStyleSheetDocument(
-    ParseContext context,
-    List         styleNodeList)
-  {
-
-      // ok, now we built up an IconNode List and a StyleNode List.
-      // now create a StyleSheetDocument from the StyleNode List.
-      StyleNode[] styleNodeArray =
-        (StyleNode[])(styleNodeList.toArray(
-                        new StyleNode[styleNodeList.size()]));
-
-      StyleSheetNode[] styleSheetNodes = {new StyleSheetNode(styleNodeArray,
-                                                             null,
-                                                             0,
-                                                             null,
-                                                             null,
-                                                             null,
-                                                             0)};
-      long timestamp = _getDocumentTimestamp(context);
+  private static StyleSheetDocument _createStyleSheetDocument(
+    ParseContext       context,
+    List <StyleSheetNode> ssNodeList)
+  {
 
-      return new StyleSheetDocument(styleSheetNodes,
+    long timestamp = _getDocumentTimestamp(context);
+
+    return new StyleSheetDocument(ssNodeList.toArray(new StyleSheetNode[0]),
                                     null,
                                     timestamp);
   }
@@ -670,13 +712,12 @@
   }
   **/
 
-  private static SkinStyleSheetNode _parseCSSStyleSheet(Reader reader)
+  private static List <SkinStyleSheetNode> _parseCSSStyleSheet(Reader reader)
   {
       SkinCSSParser parser = new SkinCSSParser();
       SkinCSSDocumentHandler documentHandler = new SkinCSSDocumentHandler();
       parser.parseCSSDocument(reader, documentHandler);
-      return documentHandler.getSkinStyleSheetNode();
-
+      return documentHandler.getSkinStyleSheetNodes();
   }
 
   // Given the sourceName of the style sheet that is being

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/style/util/StyleUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/style/util/StyleUtils.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/style/util/StyleUtils.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/style/util/StyleUtils.java Fri May 26 11:22:38 2006
@@ -31,6 +31,10 @@
  */
 public class StyleUtils
 {
+
+  public static final String RTL_CSS_SUFFIX = ":rtl";
+  public static final String LTR_CSS_SUFFIX = ":ltr";
+
   /**
    * Returns a Map which maps style class names to
    * equivalent shorter names.

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/RootRenderingContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/RootRenderingContext.java?rev=409714&r1=409713&r2=409714&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/RootRenderingContext.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/RootRenderingContext.java Fri May 26 11:22:38 2006
@@ -50,6 +50,7 @@
 
 import org.apache.myfaces.adfinternal.image.cache.FileSystemImageCache;
 
+import org.apache.myfaces.adfinternal.style.util.StyleUtils;
 import org.apache.myfaces.adfinternal.ui.data.DataObject;
 
 import org.apache.myfaces.adfinternal.ui.laf.LookAndFeel;
@@ -459,11 +460,11 @@
     {
       if ((getLocaleContext().getReadingDirection() ==
           LocaleUtils.DIRECTION_RIGHTTOLEFT) &&
-          (!mappedIconName.endsWith(_RTL_CSS_SUFFIX)))
+          (!mappedIconName.endsWith(StyleUtils.RTL_CSS_SUFFIX)))
       {
         // append :rtl to the mappedIconName. If no icon with that name,
         // default to getting the icon with the original mappedIconName.
-        String rtlIconName = mappedIconName+_RTL_CSS_SUFFIX;
+        String rtlIconName = mappedIconName+StyleUtils.RTL_CSS_SUFFIX;
         // @todo I could optimize this a bit by having a method on SkinExtension
         // which doesn't create a NullIcon when the icon is not found, if I
         // know I want to set it to something else anyway.
@@ -764,8 +765,6 @@
   private static final int _DEFAULT_PROPERTY_MAP_SIZE = 101;
 
   private static final int _DEFAULT_STACK_SIZE = 40;
-
-  private static final String _RTL_CSS_SUFFIX = ":rtl";
 
   private static final ADFLogger _LOG = ADFLogger.createADFLogger(RootRenderingContext.class);
 }



Mime
View raw message