Author: sergeyhalipov
Date: 2007-11-14 15:42:09 -0500 (Wed, 14 Nov 2007)
New Revision: 3998
Added:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java
Modified:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/images/OrderingListIconBase.java
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
Gradient images added to ordering list.
Modified:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-14
20:22:08 UTC (rev 3997)
+++
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-14
20:42:09 UTC (rev 3998)
@@ -348,6 +348,10 @@
writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button_border", null);
writer.startElement(HTML.DIV_ELEM, orderingList);
writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button", null);
+ writer.writeAttribute("onmousedown",
+ "Element.removeClassName(this, 'ol_button'); Element.addClassName(this,
'ol_button_clicked'); ", null);
+ writer.writeAttribute("onmouseup",
+ "Element.removeClassName(this, 'ol_button_clicked');
Element.addClassName(this, 'ol_button'); ", null);
}
if (htmlElem != null) {
Added:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java
(rev 0)
+++
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java 2007-11-14
20:42:09 UTC (rev 3998)
@@ -0,0 +1,40 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - 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.html.gradientimages;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+
+import org.ajax4jsf.resource.ResourceContext;
+
+/**
+ * @author Siarhej Chalipau
+ *
+ */
+public class OrderingListClickedGradient extends OrderingListHeaderGradient {
+ @Override
+ protected void paint(ResourceContext resourceContext, Graphics2D g2d) {
+ g2d.transform(new AffineTransform(1., 0., 0., -1., 0., 18.));
+ super.paint(resourceContext, g2d);
+ }
+
+}
Added:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java
(rev 0)
+++
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java 2007-11-14
20:42:09 UTC (rev 3998)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - 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.html.gradientimages;
+
+import org.richfaces.renderkit.html.BaseGradient;
+import org.richfaces.skin.Skin;
+
+/**
+ * @author Siarhej Chalipau
+ *
+ */
+public class OrderingListHeaderGradient extends BaseGradient {
+ public OrderingListHeaderGradient() {
+ super(8, 18, 9, "headerGradientColor", Skin.headerBackgroundColor);
+ }
+}
Added:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java
(rev 0)
+++
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java 2007-11-14
20:42:09 UTC (rev 3998)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - 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.html.gradientimages;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author Siarhej Chalipau
+ *
+ */
+public class OrderingListSelectGradient extends BaseGradient {
+ public OrderingListSelectGradient() {
+ super(11, 18, "headerGradientColor",
"additionalBackgroundColor");
+ }
+}
Modified:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/images/OrderingListIconBase.java
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/images/OrderingListIconBase.java 2007-11-14
20:22:08 UTC (rev 3997)
+++
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/images/OrderingListIconBase.java 2007-11-14
20:42:09 UTC (rev 3998)
@@ -72,9 +72,9 @@
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
- Dimension dim = getDimensions(context);
+ /*Dimension dim = getDimensions(context);
g2d.setColor(backgroundColor);
- g2d.fillRect(0, 0, dim.width, dim.height);
+ g2d.fillRect(0, 0, dim.width, dim.height);*/
Dimension dimension = getDimensions(context);
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-14
20:22:08 UTC (rev 3997)
+++
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-14
20:42:09 UTC (rev 3998)
@@ -40,17 +40,27 @@
height: 18px;
}
-.ol_button_layout {
- padding : 15px 8px 15px 0px;
- vertical-align : top;
+.ol_button {
+ background : repeat scroll left top;
+ border : 1px solid #bfbfc0;
+ margin-bottom : 3px;
+ cursor : pointer;
+ padding : 1px;
}
+.ol_button_clicked {
+ background : repeat scroll left top;
+ border : 1px solid #bfbfc0;
+ margin-bottom : 3px;
+ cursor : pointer;
+ padding : 1px;
+}
+
.ol_button_layout{padding : 15px 8px 15px 0px;}
.ol_button_border{border : 1px solid #bfbfc0; margin-bottom : 3px;}
+
-.ol_button{background : url(ol_images/bg_header.png) top left #C6D6EA repeat-x; cursor :
pointer; padding : 2px; font-family : Arial; font-size :11px;}
-
.ol_button_dis {
background : #bfbfc0;
border : 1px solid #bfbfc0;
@@ -66,10 +76,25 @@
}
.ol_internal_header_tab {
+ background : repeat scroll left top;
width : 100%;
}
+<<<<<<< .mine
+.ol_internal_header_tab th {
+ color : #FFFFFF;
+
+ font-family : Arial;
+ font-size :11px;
+ font-weight : normal;
+ border-bottom : 1px solid #bfbfc0;
+ border-right : 1px solid #bfbfc0;
+ padding : 2px;
+ white-space: nowrap;
+}
+=======
.ol_internal_header_tab th{background : url(ol_images/bg_header.png) top left repeat-x
#C6D6EA; color : #000000; font-family : Arial; font-size :11px; font-weight : normal;
border-bottom : 1px solid #bfbfc0;border-right : 1px solid #bfbfc0;border-left : 1px solid
#EAF0F8;border-top : 1px solid #FFFFFF; padding : 2px}
+>>>>>>> .r3997
.ol_internal_header_tab .ol_endcol {
border-right : 0px;
@@ -85,10 +110,20 @@
.ol_internal_tab td{font-family : Arial; font-size :11px; border-bottom : 1px solid
#bfbfc0;border-top : 1px solid #FFFFFF; padding : 2px}
+<<<<<<< .mine
+.ol_internal_tab tr.ol_select {
+ background : repeat scroll left top;
+}
+=======
.ol_internal_tab tr.ol_select{background : #EAF0F8}
+>>>>>>> .r3997
.ol_internal_tab tr.ol_active {
+<<<<<<< .mine
+ background : repeat scroll left top;
+=======
background : #EAF0F8; color : #4A75B5;
+>>>>>>> .r3997
}
.ol_internal_tab tr.ol_normal {
@@ -182,4 +217,40 @@
<f:resource
f:key="org.richfaces.renderkit.html.images.OrderingListIconBottomDisabled"
/>
</u:style>
</u:selector>
+
+<u:selector name=".ol_button">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.gradientimages.OrderingListHeaderGradient"
/>
+ </u:style>
+ <u:style name="background-color" skin="headerBackgroundColor"
/>
+</u:selector>
+
+<u:selector name=".ol_button_clicked">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.gradientimages.OrderingListClickedGradient"
/>
+ </u:style>
+ <u:style name="background-color" skin="headerBackgroundColor"
/>
+</u:selector>
+
+<u:selector name=".ol_internal_header_tab th">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.gradientimages.OrderingListHeaderGradient"
/>
+ </u:style>
+ <u:style name="background-color" skin="headerBackgroundColor"
/>
+</u:selector>
+
+<u:selector name=".ol_internal_tab tr.ol_select">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.gradientimages.OrderingListSelectGradient"
/>
+ </u:style>
+ <u:style name="background-color" skin="additionalBackgroundColor"
/>
+</u:selector>
+
+<u:selector name=".ol_internal_tab tr.ol_active">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.gradientimages.OrderingListSelectGradient"
/>
+ </u:style>
+ <u:style name="background-color" skin="additionalBackgroundColor"
/>
+ <u:style name="color" skin="hoverLinkColor" />
+</u:selector>
</f:template>
\ No newline at end of file