Author: sergeyhalipov
Date: 2008-03-24 15:18:22 -0400 (Mon, 24 Mar 2008)
New Revision: 7150
Added:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
Log:
http://jira.jboss.com/jira/browse/RF-2454
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-24
19:16:50 UTC (rev 7149)
+++
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-24
19:18:22 UTC (rev 7150)
@@ -586,6 +586,8 @@
spanClass = "dr-table-header-sort-up dr-table-sortable-header";
} else if (Ordering.DESCENDING.equals(col.getSortOrder())) {
spanClass = "dr-table-header-sort-down dr-table-sortable-header";
+ } else {
+ spanClass = "dr-table-header-sort-none dr-table-sortable-header";
}
writer.writeAttribute(HTML.class_ATTRIBUTE, spanClass, null);
}
@@ -599,6 +601,7 @@
writer.startElement(HTML.IMG_ELEMENT, column);
writer.writeAttribute(HTML.src_ATTRIBUTE, spacerUrl, null);
writer.writeAttribute(HTML.width_ATTRIBUTE, "16", null);
+ writer.writeAttribute(HTML.height_ATTRIBUTE, "1", null);
writer.endElement(HTML.IMG_ELEMENT);
writer.endElement(HTML.SPAN_ELEM);
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java
===================================================================
---
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java 2008-03-24
19:16:50 UTC (rev 7149)
+++
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java 2008-03-24
19:18:22 UTC (rev 7150)
@@ -1,3 +1,24 @@
+/**
+ * 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.iconimages;
import java.awt.Color;
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java
===================================================================
---
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java 2008-03-24
19:16:50 UTC (rev 7149)
+++
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java 2008-03-24
19:18:22 UTC (rev 7150)
@@ -1,3 +1,24 @@
+/**
+ * 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.iconimages;
import java.awt.Color;
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java
===================================================================
---
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java 2008-03-24
19:16:50 UTC (rev 7149)
+++
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java 2008-03-24
19:18:22 UTC (rev 7150)
@@ -1,3 +1,24 @@
+/**
+ * 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.iconimages;
import java.awt.Color;
Added:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java
===================================================================
---
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java
(rev 0)
+++
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java 2008-03-24
19:18:22 UTC (rev 7150)
@@ -0,0 +1,61 @@
+/**
+ * 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.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+import org.ajax4jsf.resource.ResourceContext;
+import org.richfaces.renderkit.html.images.TriangleIconBase;
+
+public class DataTableIconSortNone extends TriangleIconBase {
+
+ public Dimension calculateDimensions() {
+ return new Dimension(13, 4);
+ }
+
+ protected void paintImage(ResourceContext context, Graphics2D g2d,
+ Color textColor, Color borderColor) {
+ g2d.translate(4, 3);
+
+ g2d.setColor(textColor);
+ g2d.drawLine(3, 1, 3, 1);
+ g2d.drawLine(2, 2, 4, 2);
+ g2d.drawLine(1, 3, 5, 3);
+
+ g2d.drawLine(3, 7, 3, 7);
+ g2d.drawLine(2, 6, 4, 6);
+ g2d.drawLine(1, 5, 5, 5);
+
+ g2d.setColor(borderColor);
+ g2d.drawLine(0, 3, 3, 0);
+ g2d.drawLine(3, 0, 6, 3);
+ g2d.drawLine(5, 4, 1, 4);
+
+ g2d.drawLine(0, 5, 3, 8);
+ g2d.drawLine(3, 8, 6, 5);
+ }
+
+}
Modified:
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
===================================================================
---
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2008-03-24
19:16:50 UTC (rev 7149)
+++
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2008-03-24
19:18:22 UTC (rev 7150)
@@ -103,7 +103,7 @@
<f:verbatim>
.dr-table-sortable-header {
- background-position: right;
+ background-position: right center;
background-repeat: no-repeat;
white-space : nowrap;
}
@@ -129,6 +129,12 @@
</u:style>
</u:selector>
+<u:selector name=".dr-table-header-sort-none" >
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.iconimages.DataTableIconSortNone"/>
+ </u:style>
+</u:selector>
+
<u:selector name=".dr-table-footer" >
<u:style name="background-color"
skin="tableFooterBackgroundColor"/> <!--tableFooterBackgroundColor-->
</u:selector>