Author: sergeyhalipov
Date: 2007-05-18 13:07:11 -0400 (Fri, 18 May 2007)
New Revision: 809
Added:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuGroupGradient.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuItemGradient.java
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
Log:
Panel menu: gradient backgrounds added.
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
===================================================================
---
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-18
15:00:20 UTC (rev 808)
+++
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-18
17:07:11 UTC (rev 809)
@@ -46,9 +46,9 @@
Object property = requestMap.get("panelMenuState"+clientId);
if (property.equals("opened")) {
- component.getAttributes().put("expanded", "true");
+ ((UIPanelMenuGroup)component).setExpanded(true);
} else if (property.equals("closed")) {
- component.getAttributes().put("expanded", "false");
+ ((UIPanelMenuGroup)component).setExpanded(false);
}
}
Added:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuGroupGradient.java
===================================================================
---
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuGroupGradient.java
(rev 0)
+++
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuGroupGradient.java 2007-05-18
17:07:11 UTC (rev 809)
@@ -0,0 +1,32 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.gradientImages;
+
+import org.ajax4jsf.framework.skin.Skin;
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class PanelMenuGroupGradient extends BaseGradient {
+ public PanelMenuGroupGradient() {
+ super(10, 40, 14, "headerGradientColor", Skin.headerBackgroundColor);
+ }
+
+}
Added:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuItemGradient.java
===================================================================
---
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuItemGradient.java
(rev 0)
+++
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/gradientImages/PanelMenuItemGradient.java 2007-05-18
17:07:11 UTC (rev 809)
@@ -0,0 +1,31 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.gradientImages;
+
+import org.ajax4jsf.framework.skin.Skin;
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class PanelMenuItemGradient extends BaseGradient {
+ public PanelMenuItemGradient() {
+ super(10, 40, 14, "controlBackgroundColor",
Skin.generalBackgroundColor);
+ }
+}
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
---
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-18
15:00:20 UTC (rev 808)
+++
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-18
17:07:11 UTC (rev 809)
@@ -7,11 +7,16 @@
<f:verbatim>
.dr-pmenu-group {
height: 20px;
+ background-repeat: repeat-x;
+ background-position: left top;
}
.dr-pmenu-item {
height: 20px;
+ background-repeat: repeat-x;
+ background-position: left top;
}
+
</f:verbatim>
<u:selector name=".dr-pmenu-group">
@@ -28,6 +33,9 @@
<u:style name="border-top-style" value="solid"/>
<u:style name="border-color" skin="panelBorderColor"/>
<u:style name="background-color"
skin="headerBackgroundColor"/>
+ <u:style name="background-image" >
+ <f:resource
f:key="org.richfaces.renderkit.gradientImages.PanelMenuGroupGradient" />
+ </u:style>
</u:selector>
<u:selector name=".dr-pmenu-item">
@@ -43,5 +51,20 @@
<u:style name="border-style" value="none"/>
<u:style name="border-top-style" value="solid"/>
<u:style name="border-color" skin="subBorderColor"/>
+ <u:style name="background-image" >
+ <f:resource
f:key="org.richfaces.renderkit.gradientImages.PanelMenuItemGradient" />
+ </u:style>
</u:selector>
+
+ <u:selector name=".dr-pmenu-group-tr">
+ <u:style name="background-image" >
+ <f:resource
f:key="org.richfaces.renderkit.gradientImages.PanelMenuGroupGradient" />
+ </u:style>
+ </u:selector>
+
+ <u:selector name=".dr-pmenu-item-tr">
+ <u:style name="background-image" >
+ <f:resource
f:key="org.richfaces.renderkit.gradientImages.PanelMenuItemGradient" />
+ </u:style>
+ </u:selector>
</f:template>
\ No newline at end of file
Show replies by date