JBoss Rich Faces SVN: r1137 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-12 09:53:13 -0400 (Tue, 12 Jun 2007)
New Revision: 1137
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/DataModelCache.java
Log:
added server-side caching
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/DataModelCache.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/DataModelCache.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/DataModelCache.java 2007-06-12 13:53:13 UTC (rev 1137)
@@ -0,0 +1,170 @@
+/**
+ *
+ */
+package org.richfaces.model;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.DataModelListener;
+
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.ajax.repeat.SerializableDataModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class DataModelCache extends GridDataModel {
+
+ private static Log log = LogFactory.getLog(DataModelCache.class);
+
+ private static class DataRange {
+ private int startRow;
+ private int endRow;
+ private SortOrder sortOrder;
+ private List loadedData;
+
+ public DataRange(int startRow, int endRow, SortOrder sortOrder,
+ List loadedData) {
+ super();
+ this.startRow = startRow;
+ this.endRow = endRow;
+ this.sortOrder = sortOrder;
+ this.loadedData = loadedData;
+ }
+
+ public boolean match(int s, int e, SortOrder sortOrder) {
+ return s == startRow
+ && e == endRow
+ && sortOrdersMatch(sortOrder, this.sortOrder);
+ }
+
+ private boolean sortOrdersMatch(SortOrder sortOrder1, SortOrder sortOrder2) {
+ boolean result = sortOrder1 == sortOrder2;
+
+ if (sortOrder1 != null && sortOrder2 != null) {
+ result = sortOrder1.equals(sortOrder2);
+ }
+
+ return result;
+ }
+
+ }
+
+ private Map secondaryMapping = new HashMap();
+
+ private DataRange dataRange;
+
+ private GridDataModel gridDataModel;
+
+
+ public DataModelCache(GridDataModel gridDataModel) {
+ super();
+ this.gridDataModel = gridDataModel;
+
+ if (log.isTraceEnabled()) {
+ log.trace("initializing with " + gridDataModel);
+ }
+ }
+
+ public void addDataModelListener(DataModelListener listener) {
+ gridDataModel.addDataModelListener(listener);
+ }
+
+ public DataModelListener[] getDataModelListeners() {
+ return gridDataModel.getDataModelListeners();
+ }
+
+ public Object getObjectById(Object id) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to get object by id" + id);
+ }
+
+ Object cached = secondaryMapping.get(id);
+
+ if (cached == null) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Cache miss " + id + " falling back to original model");
+ }
+
+ cached = gridDataModel.getObjectById(id);
+ secondaryMapping.put(id, cached);
+
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("At last found element " + cached);
+ }
+
+ return cached;
+ }
+
+ public int getRowCount() {
+ return gridDataModel.getRowCount();
+ }
+
+ public Object getRowData() {
+ return gridDataModel.getRowData();
+ }
+
+ public int getRowIndex() {
+ return gridDataModel.getRowIndex();
+ }
+
+ public Object getRowKey() {
+ return gridDataModel.getRowKey();
+ }
+
+ public SerializableDataModel getSerializableModel(Range range) {
+ return gridDataModel.getSerializableModel(range);
+ }
+
+ public Object getWrappedData() {
+ return gridDataModel.getWrappedData();
+ }
+
+ public boolean isRowAvailable() {
+ return secondaryMapping.containsKey(getRowKey()) || gridDataModel.isRowAvailable();
+ }
+
+ public List loadData(int startRow, int endRow, SortOrder sortOrder) {
+ if (dataRange == null || !dataRange.match(startRow, endRow, sortOrder)) {
+ List data = gridDataModel.loadData(startRow, endRow, sortOrder);
+ dataRange = new DataRange(startRow, endRow, sortOrder, data);
+ }
+ return dataRange.loadedData;
+ }
+
+ public void removeDataModelListener(DataModelListener listener) {
+ gridDataModel.removeDataModelListener(listener);
+ }
+
+ public void setRowIndex(int arg0) {
+ gridDataModel.setRowIndex(arg0);
+ }
+
+ public void setRowKey(Object key) {
+ gridDataModel.setRowKey(key);
+ }
+
+ public void setWrappedData(Object arg0) {
+ gridDataModel.setWrappedData(arg0);
+ }
+
+
+ public void walk(FacesContext context, DataVisitor visitor, Range range,
+ Object argument) throws IOException {
+ // TODO Auto-generated method stub
+ super.walk(context, visitor, range, argument);
+ }
+
+}
17 years, 7 months
JBoss Rich Faces SVN: r1136 - in trunk/sandbox/scrollable-grid/src/main/java/org/richfaces: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-12 09:52:54 -0400 (Tue, 12 Jun 2007)
New Revision: 1136
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java
Log:
added server-side caching
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-06-12 13:11:14 UTC (rev 1135)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-06-12 13:52:54 UTC (rev 1136)
@@ -27,6 +27,7 @@
import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.event.sort.SortEvent;
import org.richfaces.model.BufferedSequenceRange;
+import org.richfaces.model.DataModelCache;
import org.richfaces.model.GridDataModel;
import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.SortOrder;
@@ -103,7 +104,7 @@
Object value = getValue();
if (value instanceof GridDataModel) {
- return (GridDataModel) value;
+ return new DataModelCache((GridDataModel) value);
}
if (value instanceof ScrollableGridDataModel) {
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java 2007-06-12 13:11:14 UTC (rev 1135)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java 2007-06-12 13:52:54 UTC (rev 1136)
@@ -108,8 +108,7 @@
}
public boolean isRowAvailable() {
- //boolean result
- return mapping != null && mapping.containsKey(getRowKey());
+ return getRowData() != null;
}
public void setRowIndex(int arg0) {
17 years, 7 months
JBoss Rich Faces SVN: r1135 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-12 09:11:14 -0400 (Tue, 12 Jun 2007)
New Revision: 1135
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
Fix header rendering
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-12 13:10:49 UTC (rev 1134)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-12 13:11:14 UTC (rev 1135)
@@ -659,7 +659,7 @@
state.setFrozenColumnCount(GridUtils.getFrozenColumnsCount(grid));
ColumnWalker.iterateOverColumns(context, grid, columnsWidthCounter, null, state);
ComponentVariables variables = ComponentsVariableResolver.getVariables(this, grid);
- int sumWidth = state.getSumWidth() + 20;
+ int sumWidth = state.getSumWidth() + 1020;
variables.setVariable("sumWidth", new Integer(sumWidth));
}
17 years, 7 months
JBoss Rich Faces SVN: r1134 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-12 09:10:49 -0400 (Tue, 12 Jun 2007)
New Revision: 1134
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Fix header rendering
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-12 12:45:24 UTC (rev 1133)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-12 13:10:49 UTC (rev 1134)
@@ -60,7 +60,7 @@
renderCols(context, component, false);
]]>
</jsp:scriptlet>
- <col width="100px" />
+ <col width="1000px" />
<tbody>
<tr class="ClientUI_Grid_HR">
<jsp:scriptlet>
@@ -68,7 +68,7 @@
renderHeaders(context, component, false);
]]>
</jsp:scriptlet>
- <td style="width: 100px"></td>
+ <td style="width: 1000px"></td>
</tr>
</tbody>
</table>
17 years, 7 months
JBoss Rich Faces SVN: r1133 - in trunk/richfaces/tree/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-12 08:45:24 -0400 (Tue, 12 Jun 2007)
New Revision: 1133
Modified:
trunk/richfaces/tree/src/main/config/component/tree.xml
trunk/richfaces/tree/src/main/config/component/treeNode.xml
trunk/richfaces/tree/src/main/templates/htmlTree.jspx
trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
Log:
http://jira.jboss.com/jira/browse/RF-214
Modified: trunk/richfaces/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-12 10:58:40 UTC (rev 1132)
+++ trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-12 12:45:24 UTC (rev 1133)
@@ -52,7 +52,8 @@
</property>
&ui_component_attributes;
&html_style_attributes;
-
+ &html_events;
+
<property>
<name>stateVar</name>
<classname>java.lang.String</classname>
Modified: trunk/richfaces/tree/src/main/config/component/treeNode.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/treeNode.xml 2007-06-12 10:58:40 UTC (rev 1132)
+++ trunk/richfaces/tree/src/main/config/component/treeNode.xml 2007-06-12 12:45:24 UTC (rev 1133)
@@ -106,7 +106,9 @@
<property hidden="true">
<name>dropValue</name>
- </property>
+ </property>
+
+ &html_events;
</component>
&listeners;
</components>
Modified: trunk/richfaces/tree/src/main/templates/htmlTree.jspx
===================================================================
--- trunk/richfaces/tree/src/main/templates/htmlTree.jspx 2007-06-12 10:58:40 UTC (rev 1132)
+++ trunk/richfaces/tree/src/main/templates/htmlTree.jspx 2007-06-12 12:45:24 UTC (rev 1133)
@@ -38,7 +38,11 @@
<f:call name="encodeAttributeParameters" />
- <f:call name="writeNamespace" />
+ <f:call name="writeNamespace" />
+
+ <f:call name="utils.encodePassThruWithExclusions">
+ <f:parameter value="id,style,class"/>
+ </f:call>
<table width="100%" cellpadding="0">
<tbody>
Modified: trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-06-12 10:58:40 UTC (rev 1132)
+++ trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-06-12 12:45:24 UTC (rev 1133)
@@ -31,8 +31,12 @@
<f:call name="initializeLines" />
<f:call name="initializeResources" />
- <tr id="#{clientId}:mainRow" onclick="#{this:getToggleScript(context, component, 'mainRow')} return false;" >
- <f:call name="encodeAttributeParameters" />
+ <tr id="#{clientId}:mainRow" onclick="#{component.attributes['onclick']}; #{this:getToggleScript(context, component, 'mainRow')} return false;" >
+ <f:call name="encodeAttributeParameters" />
+
+ <f:call name="utils.encodePassThruWithExclusions">
+ <f:parameter value="id,onclick"/>
+ </f:call>
<td class="dr-tree-h-ic #{line}">
<div>
<jsp:scriptlet>
17 years, 7 months
JBoss Rich Faces SVN: r1132 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-12 06:58:40 -0400 (Tue, 12 Jun 2007)
New Revision: 1132
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
small fix
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-12 07:26:32 UTC (rev 1131)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-12 10:58:40 UTC (rev 1132)
@@ -225,7 +225,7 @@
restoreState: function() {
this.selectionFlag = null;
this.selection.initRanges($(this.inputElement).value);
- this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
+ // this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
var i = 0;
var j;
while(i < this.selection.ranges.length) {
@@ -360,13 +360,14 @@
}
var range;
if ( event.shiftKey && !event.ctrlKey && !event.altKey) {
+ this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
this.selectionFlag = "x";
if(!this.shiftRow) {
this.shiftRow = this.activeRow;
}
this.startRow = this.shiftRow;
if (((this.startRow <= rowIndex) && (this.firstIndex <= this.startRow || rowIndex < this.firstIndex))
- || (this.startRow > rowIndex && this.firstIndex > this.startRow && rowIndex >= this.firstIndex)) {
+ || (this.startRow > rowIndex && this.firstIndex < this.startRow && rowIndex <= this.firstIndex)) {
this.endRow = rowIndex;
} else {
this.endRow = this.startRow;
17 years, 7 months
JBoss Rich Faces SVN: r1131 - in trunk/sandbox/scrollable-grid/src/main/javascript: ClientUI/common/utils and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-12 03:26:32 -0400 (Tue, 12 Jun 2007)
New Revision: 1131
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Box.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/InlineBox.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/ScrollableBox.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Substrate.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/CustomEvent.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js
trunk/sandbox/scrollable-grid/src/main/javascript/common/prototype/ext/extend.js
Log:
Fix problem with multiple js file including collisions
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Box.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Box.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Box.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -248,4 +248,6 @@
});
+if(!ClientUI_common_box_Box_idGenerator) {
var ClientUI_common_box_Box_idGenerator = 0;
+};
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/InlineBox.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/InlineBox.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/InlineBox.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -42,4 +42,6 @@
}
});
-var ClientUI_common_box_InlineBox_idGenerator = 0;
\ No newline at end of file
+if(!ClientUI_common_box_InlineBox_idGenerator) {
+ var ClientUI_common_box_InlineBox_idGenerator = 0;
+};
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/ScrollableBox.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/ScrollableBox.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/ScrollableBox.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -136,4 +136,4 @@
this.scrollerWidth = (wNoScroll - wScroll);
return this.scrollerWidth || 0;
}
-})
\ No newline at end of file
+});
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Substrate.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Substrate.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/Substrate.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -28,7 +28,7 @@
fakeElement.removeChild(element);
}
- ClientUI.common.box.InlineBox.parentClass.constructor().call(this, element, parentElement, dontUpdateStyles);
+ ClientUI.common.box.Substrate.parentClass.constructor().call(this, element, parentElement, dontUpdateStyles);
// additional styles
if(!dontUpdateStyles) {
@@ -36,4 +36,6 @@
}
});
-var ClientUI_common_box_Substrate_idGenerator = 0;
\ No newline at end of file
+if(!ClientUI_common_box_Substrate_idGenerator) {
+ var ClientUI_common_box_Substrate_idGenerator = 0;
+};
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/CustomEvent.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/CustomEvent.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/CustomEvent.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -5,6 +5,8 @@
*/
ClientUILib.declarePackage("ClientUI.common.utils.CustomEvent");
+if(!ClientUI.common.utils.CustomEvent.CLASSDEF) {
+
ClientUI.common.utils.CustomEvent = Class.create({
CLASSDEF: {
name: 'ClientUI.common.utils.CustomEvent'
@@ -101,4 +103,5 @@
var ClientUI_common_utils_CustomEvent_idGenerator = 0;
+};
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -191,7 +191,9 @@
setProgressCtrl: function(ctrl) {
this.getBody().setProgressCtrl(ctrl);
}
-})
+});
+if(!ClientUI_controls_grid_Grid_idGenerator) {
var ClientUI_controls_grid_Grid_idGenerator = 0;
+};
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -158,4 +158,4 @@
var columns = this.grid.getHeader().getColumns();
columns[column].footerCol.width = width;
}
-})
+});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -56,16 +56,4 @@
getContainer: function() {
return this.container;
}
-})
-
-/*
- Vertically and horizontally centering a div that follow scrolling:
-
- if(navigator.appName.search(/opera/gi) != -1) { // Using Opera
- _element.style.top = Math.round(((document.body.clientHeight-document.documentElement.offsetHeight)/2)-(_element.style.height/2)+document.documentElement.scrollTop)+'px';
- }
- else { // Using IE / Firefox / Other
- _element.style.left = Math.round((document.documentElement.clientWidth/2)-(_element.style.width/2))+"px";
- _element.style.top = Math.round((document.documentElement.clientHeight/2)-(_element.style.height/2)+document.documentElement.scrollTop)+"px";
- }
- */
\ No newline at end of file
+});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -95,4 +95,6 @@
}
});
-var ClientUI_layouts_VLayoutManager_idGenerator = 0;
\ No newline at end of file
+if(!ClientUI_layouts_VLayoutManager_idGenerator) {
+ var ClientUI_layouts_VLayoutManager_idGenerator = 0;
+};
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/common/prototype/ext/extend.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/common/prototype/ext/extend.js 2007-06-11 18:31:30 UTC (rev 1130)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/common/prototype/ext/extend.js 2007-06-12 07:26:32 UTC (rev 1131)
@@ -12,6 +12,8 @@
// The Extend object holds all the information required to implement the
// inheritance and other OO-goodness.
+if(!window.Extend) {
+
Extend = {
VERSION: 1.1,
CLASSDEF: "CLASSDEF",
@@ -181,6 +183,7 @@
return newval
})*/
return new_class
-}
+};
+};
// EOF
17 years, 7 months
JBoss Rich Faces SVN: r1130 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-11 14:31:30 -0400 (Mon, 11 Jun 2007)
New Revision: 1130
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java
Log:
Updated a server part of selection.
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java 2007-06-11 18:08:32 UTC (rev 1129)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java 2007-06-11 18:31:30 UTC (rev 1130)
@@ -16,6 +16,8 @@
private static final long serialVersionUID = 5855157282287053681L;
+ private String selectionFlag;
+
private List ranges = new ArrayList();
public ClientSelection() {
@@ -91,4 +93,14 @@
}
+
+
+ public String getSelectionFlag() {
+ return selectionFlag;
+ }
+
+
+ public void setSelectionFlag(String selectionFlag) {
+ this.selectionFlag = selectionFlag;
+ }
}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java 2007-06-11 18:08:32 UTC (rev 1129)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java 2007-06-11 18:31:30 UTC (rev 1130)
@@ -62,28 +62,31 @@
final ClientSelection clientSelection = new ClientSelection();
String [] selections = stringSelection.split(";");
-
- for (int i = 0; i < selections.length; i++) {
+ int length = selections.length;
+ if (selections[length-1].length() == 1) {
+ clientSelection.setSelectionFlag(selections[length-1]);
+ length--;
+ }
+ for (int i = 0; i < length; i++) {
String range = selections[i];
- if (range.length() == 0) {
- continue;
- }
- String [] rng = range.split(",");
-
- try {
- int fi = Integer.parseInt(rng[0]);
- int il = Integer.parseInt(rng[1]);
+ if (range.length() != 0) {
+ String [] rng = range.split(",");
- if (log.isDebugEnabled()) {
- log.debug("Parsed range " + fi + " " + il);
+ try {
+ int fi = Integer.parseInt(rng[0]);
+ int il = Integer.parseInt(rng[1]);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Parsed range " + fi + " " + il);
+ }
+
+ clientSelection.addRange(new SelectionRange(fi, il));
+
+ } catch (NumberFormatException e) {
+ throw new ConverterException(e);
}
-
- clientSelection.addRange(new SelectionRange(fi, il));
-
- } catch (NumberFormatException e) {
- throw new ConverterException(e);
}
}
17 years, 7 months
JBoss Rich Faces SVN: r1129 - in trunk/richfaces: common/src/main/java/org/richfaces/renderkit/html/images and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-11 14:08:32 -0400 (Mon, 11 Jun 2007)
New Revision: 1129
Added:
trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/
trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
Removed:
trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
Log:
Correct support for "plain" skin added.
Added: trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java (rev 0)
+++ trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2007-06-11 18:08:32 UTC (rev 1129)
@@ -0,0 +1,66 @@
+/**
+ * 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.html.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.Java2Dresource;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+public abstract class SliderArrowBase extends Java2Dresource{
+ private static final Dimension dimensions = new Dimension(7, 8);
+
+ public SliderArrowBase() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return dimensions;
+ }
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return dimensions;
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ Integer color = (Integer) restoreData(context);
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(new Color(color.intValue()));
+ g2d.drawLine(0,2,6,2);
+ g2d.drawLine(1,3,5,3);
+ g2d.drawLine(2,4,4,4);
+ g2d.drawLine(3,5,3,5);
+ }
+
+ public boolean isCacheable() {
+ return true;
+ }
+
+}
Added: trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java (rev 0)
+++ trunk/richfaces/common/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-11 18:08:32 UTC (rev 1129)
@@ -0,0 +1,44 @@
+/**
+ * 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.html.images;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.HtmlColor;
+
+public class SliderArrowImage extends SliderArrowBase {
+ protected Object getDataToStore(FacesContext context, Object data) {
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+
+ String skinParameter = "generalTextColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
+ return new Integer(intValue);
+ }
+
+}
\ No newline at end of file
Deleted: trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,66 +0,0 @@
-/**
- * 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.html.images;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.util.Date;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.resource.GifRenderer;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.Java2Dresource;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-public abstract class SliderArrowBase extends Java2Dresource{
- private static final Dimension dimensions = new Dimension(7, 8);
-
- public SliderArrowBase() {
- setRenderer(new GifRenderer());
- setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
- }
-
- protected Dimension getDimensions(ResourceContext resourceContext) {
- return dimensions;
- }
- public Dimension getDimensions(FacesContext facesContext, Object data) {
- return dimensions;
- }
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
- Integer color = (Integer) restoreData(context);
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(new Color(color.intValue()));
- g2d.drawLine(0,2,6,2);
- g2d.drawLine(1,3,5,3);
- g2d.drawLine(2,4,4,4);
- g2d.drawLine(3,5,3,5);
- }
-
- public boolean isCacheable() {
- return true;
- }
-
-}
Deleted: trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,44 +0,0 @@
-/**
- * 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.html.images;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.skin.SkinFactory;
-import org.ajax4jsf.framework.util.HtmlColor;
-
-public class SliderArrowImage extends SliderArrowBase {
- protected Object getDataToStore(FacesContext context, Object data) {
- Skin skin = SkinFactory.getInstance().getSkin(context);
-
- String skinParameter = "generalTextColor";
- String tmp = (String) skin.getParameter(context, skinParameter);
- if (null == tmp || "".equals(tmp)) {
- Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
- tmp = (String) defaultSkin.getParameter(context, skinParameter);
- }
- int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
- return new Integer(intValue);
- }
-
-}
\ No newline at end of file
Deleted: trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,66 +0,0 @@
-/**
- * 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.html.images;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.util.Date;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.resource.GifRenderer;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.Java2Dresource;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-public abstract class SliderArrowBase extends Java2Dresource{
- private static final Dimension dimensions = new Dimension(7, 8);
-
- public SliderArrowBase() {
- setRenderer(new GifRenderer());
- setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
- }
-
- protected Dimension getDimensions(ResourceContext resourceContext) {
- return dimensions;
- }
- public Dimension getDimensions(FacesContext facesContext, Object data) {
- return dimensions;
- }
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
- Integer color = (Integer) restoreData(context);
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(new Color(color.intValue()));
- g2d.drawLine(0,2,6,2);
- g2d.drawLine(1,3,5,3);
- g2d.drawLine(2,4,4,4);
- g2d.drawLine(3,5,3,5);
- }
-
- public boolean isCacheable() {
- return true;
- }
-
-}
Deleted: trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-11 17:54:25 UTC (rev 1128)
+++ trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-11 18:08:32 UTC (rev 1129)
@@ -1,44 +0,0 @@
-/**
- * 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.html.images;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.skin.SkinFactory;
-import org.ajax4jsf.framework.util.HtmlColor;
-
-public class SliderArrowImage extends SliderArrowBase {
- protected Object getDataToStore(FacesContext context, Object data) {
- Skin skin = SkinFactory.getInstance().getSkin(context);
-
- String skinParameter = "generalTextColor";
- String tmp = (String) skin.getParameter(context, skinParameter);
- if (null == tmp || "".equals(tmp)) {
- Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
- tmp = (String) defaultSkin.getParameter(context, skinParameter);
- }
- int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
- return new Integer(intValue);
- }
-
-}
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r1128 - in trunk/richfaces: dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/css and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-11 13:54:25 -0400 (Mon, 11 Jun 2007)
New Revision: 1128
Added:
trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
Modified:
trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/css/dataFilterSlider.xcss
trunk/richfaces/dataFilterSlider/src/main/templates/dataFilterSlider.jspx
trunk/richfaces/datascroller/src/main/resources/org/richfaces/renderkit/html/css/datascroller.xcss
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss
trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss
trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
trunk/richfaces/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss
trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss
trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss
Log:
Correct support for "plain" skin added.
Added: trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java (rev 0)
+++ trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2007-06-11 17:54:25 UTC (rev 1128)
@@ -0,0 +1,66 @@
+/**
+ * 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.html.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.Java2Dresource;
+import org.ajax4jsf.framework.resource.ResourceContext;
+
+public abstract class SliderArrowBase extends Java2Dresource{
+ private static final Dimension dimensions = new Dimension(7, 8);
+
+ public SliderArrowBase() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return dimensions;
+ }
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return dimensions;
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ Integer color = (Integer) restoreData(context);
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(new Color(color.intValue()));
+ g2d.drawLine(0,2,6,2);
+ g2d.drawLine(1,3,5,3);
+ g2d.drawLine(2,4,4,4);
+ g2d.drawLine(3,5,3,5);
+ }
+
+ public boolean isCacheable() {
+ return true;
+ }
+
+}
Added: trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java (rev 0)
+++ trunk/richfaces/dataFilterSlider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-11 17:54:25 UTC (rev 1128)
@@ -0,0 +1,44 @@
+/**
+ * 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.html.images;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.HtmlColor;
+
+public class SliderArrowImage extends SliderArrowBase {
+ protected Object getDataToStore(FacesContext context, Object data) {
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+
+ String skinParameter = "generalTextColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
+ return new Integer(intValue);
+ }
+
+}
\ No newline at end of file
Modified: trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/css/dataFilterSlider.xcss
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/css/dataFilterSlider.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/css/dataFilterSlider.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -16,13 +16,15 @@
height: 10px;
overflow:hidden;
float:left;
- border : 1px solid #678BBD;
+ border-width: 1px;
+ border-style: solid;
}
.range-decor{
height : 100%;
width : 100%;
- border : 1px solid #fff;
+ border-width: 1px;
+ border-style: solid;
}
.trailer{
@@ -47,12 +49,8 @@
}
.slider-input-field{
- border: #000000 1px solid;
- border-bottom: #b0b0b0 1px solid;
- border-right: #b0b0b0 1px solid;
- background: #FFFFFF url('') left top repeat-x;
- font: normal 11px arial, sans-serif;
- color: #000000;
+ border: 1px solid;
+ background: left top repeat-x;
padding: 0px 0px 0px 3px;
width : 40px;
margin: 0px 0px 0px 10px;
@@ -70,6 +68,10 @@
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
+<u:selector name=".range">
+ <u:style name="border-color" skin="subBorderColor"/>
+</u:selector>
+
<u:selector name=".trailer">
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/images/sldr_trailer3_bg.gif" />
@@ -84,6 +86,9 @@
<u:style name="font-family" skin="generalFamilyFont"/>
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="color" skin="controlTextColor"/>
+ <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="border-bottom-color" skin="subBorderColor" />
+ <u:style name="border-right-color" skin="subBorderColor" />
</u:selector>
Modified: trunk/richfaces/dataFilterSlider/src/main/templates/dataFilterSlider.jspx
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/templates/dataFilterSlider.jspx 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/dataFilterSlider/src/main/templates/dataFilterSlider.jspx 2007-06-11 17:54:25 UTC (rev 1128)
@@ -15,7 +15,7 @@
<h:scripts>new org.ajax4jsf.framework.resource.PrototypeScript(),scripts/scriptaculous-js-1.6.5/src/slider.js</h:scripts>
<f:clientid var="clientId"/>
- <f:resource name="/org/richfaces/renderkit/html/images/sldr_arr.gif" var="arrow" />
+ <f:resource name="org.richfaces.renderkit.html.images.SliderArrowImage" var="arrow" />
<jsp:scriptlet>
<![CDATA[org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
Modified: trunk/richfaces/datascroller/src/main/resources/org/richfaces/renderkit/html/css/datascroller.xcss
===================================================================
--- trunk/richfaces/datascroller/src/main/resources/org/richfaces/renderkit/html/css/datascroller.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/datascroller/src/main/resources/org/richfaces/renderkit/html/css/datascroller.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -7,29 +7,23 @@
.dr-dscr{
}
.dr-dscr-t{
- border : 1px solid #c0c0c0; /*panelBorderColor*/
- background-color : #ffffff; /*tableBackgroundColor*/
+ border-width : 1px;
+ border-style: solid;
}
.dr-dscr-button{
- background-color :#EAF0F8; /*additionalBackgroundColor*/
- border : 1px solid #c0c0c0; /*panelBorderColor*/
- font-family : verdana; /*generalFamilyFont*/
- font-size : 11px; /*generalSizeFont*/
+ border-width: 1px;
+ border-style: solid;
width : 25px;
cursor : pointer;
}
.dr-dscr-act{
- border-top : 2px solid #000000; /*generalTextColor*/
- color : #000000; /*generalTextColor*/
- font-family : verdana; /*generalFamilyFont*/
- font-size : 11px; /*generalSizeFont*/
+ border-top-width: 2px;
+ border-top-style: solid;
width : 25px;
}
.dr-dscr-inact{
- border-top : 2px solid #4A75B5; /*headerBackgroundColor*/
- color : #4A75B5; /*headerBackgroundColor*/
- font-family : verdana; /*generalFamilyFont*/
- font-size : 11px; /*generalSizeFont*/
+ border-top-width: 2px;
+ border-top-style: solid;
width : 25px;
cursor : pointer;
}
@@ -66,5 +60,10 @@
<u:style name="font-size" skin="generalSizeFont" />
</u:selector>
+<u:selector name=".dr-dscr-t">
+ <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="background-color" skin="tableBackgroundColor" />
+</u:selector>
+
</f:template>
Modified: trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -7,16 +7,13 @@
.dr-menu-list-border {
- border : 1px solid #bfbfc0;
- background-color : #e7f2fb;
+ border : 1px solid;
float : left;
position : absolute;
}
.dr-menu-list-bg {
- border-top : 1px solid #e7f2fb;
- border-left : 1px solid #e7f2fb;
- border-right : 1px solid #e7f2fb;
- background : url(menu_list_bg.gif) repeat-y left;
+ border : 1px solid;
+ background : repeat-y left;
}
.dr-menu-label {
left: 0px;
@@ -31,10 +28,8 @@
padding : 3px 6px;
}
.dr-menu-label-select {
- border : 1px solid #bfbfc0;
+ border : 1px solid;
cursor : pointer;
- background : #a9c5e7;
- color : #FFFFFF;
}
.dr-label-text-decor {
font-weight : bold;
Modified: trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -5,26 +5,26 @@
<f:verbatim><![CDATA[
-.dr-insldr-tip{
+.dr-insldr-tip {
position : absolute;
white-space : nowrap;
padding : 0px 2px 0px 2px;
top: -17px;
- border : 1px solid #E5973E;
+ border : 1px solid;
}
.dr-insldr-size {
width: 100%;
}
-.dr-insldr-left-num{
+.dr-insldr-left-num {
text-align : left;
- border-left : 1px solid #678BBD;
+ border-left: 1px solid;
padding : 0px 3px 0px 3px;
}
.dr-insldr-right-num{
text-align : right;
- border-right : 1px solid #678BBD;
+ border-right : 1px solid;
padding : 0px 3px 0px 3px;
}
.dr-insldr-vert-spacer{
@@ -54,19 +54,16 @@
height : 8px;
font-size : 1px;
}
-.dr-insldr-track-decor-1{
+.dr-insldr-track-decor-1 {
height : 100%;
width : 100%;
- border : 1px solid #678BBD;
+ border : 1px solid;
}
-.dr-insldr-track-decor-2{
+.dr-insldr-track-decor-2 {
border : 1px solid white;
}
-.dr-insldr-field{
- border-left: #000000 1px solid;
- border-top: #000000 1px solid;
- border-bottom: #b0b0b0 1px solid;
- border-right: #b0b0b0 1px solid;
+.dr-insldr-field {
+ border: 1px solid;
padding: 0px 0px 0px 3px;
margin: 0px 0px 0px 10px;
background-position: left top;
@@ -133,5 +130,8 @@
<u:style name="font-family" skin="generalFamilyFont"/>
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="color" skin="controlTextColor"/>
+ <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="border-bottom-color" skin="subBorderColor" />
+ <u:style name="border-right-color" skin="subBorderColor" />
</u:selector>
</f:template>
\ No newline at end of file
Modified: trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -6,15 +6,11 @@
<f:verbatim>
<![CDATA[
.dr-spnr-e {
- background-color : #ffffff;
padding: 0px;
margin: 0px;
background-position: left top;
background-repeat: repeat-x;
- border-left: #000000 1px solid;
- border-top: #000000 1px solid;
- border-bottom: #b0b0b0 1px solid;
- border-right: #b0b0b0 1px solid;
+ border: 1px solid;
}
.dr-spnr-i {
@@ -22,8 +18,6 @@
padding: 0px 0px 0px 3px;
background: none transparent scroll repeat 0% 0%;
margin: 0px;
- font-family: Arial, Verdana, sans-serif;
- font-size: 11px
}
.dr-spnr-b {
@@ -48,24 +42,17 @@
<u:selector name=".dr-spnr-i">
<u:style name="font-size" skin="buttonSizeFont"/>
- <u:style name="line-height">
- <f:call name="org.richfaces.component.util.HtmlUtil.addToSize">
- <f:parameter value="#{a4jSkin.buttonSizeFont}" />
- <f:parameter value="2" />
- </f:call>
- </u:style>
- <u:style name="height">
- <f:call name="org.richfaces.component.util.HtmlUtil.addToSize">
- <f:parameter value="#{a4jSkin.buttonSizeFont}" />
- <f:parameter value="2" />
- </f:call>
- </u:style>
+ <u:style name="font-family" skin="buttonFamilyFont"/>
</u:selector>
<u:selector name=".dr-spnr-e">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.background.SpinnerFieldGradient" />
</u:style>
+ <u:style name="background-color" skin="controlBackgroundColor" />
+ <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="border-bottom-color" skin="subBorderColor" />
+ <u:style name="border-right-color" skin="subBorderColor" />
</u:selector>
<u:selector name=".dr-spnr-b">
Modified: trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
===================================================================
--- trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -7,7 +7,7 @@
.dr-menu-separator {
font-size : 0px;
- border-top: 1px solid #bfbfc0;
+ border-top: 1px solid;
margin : 2px 0px 2px 24px;
}
.dr-menu-item {
@@ -20,13 +20,12 @@
padding : 2px 36px 2px 2px;
}
.dr-menu-item-hover {
- border : 1px solid #4a70ab;
+ border : 1px solid;
cursor : pointer;
}
.dr-menu-item-disabled {
border : 0px solid transparent;
- cursor : default;
- color : #839eca;
+ cursor : default;
}
.dr-menu-icon {
margin-right : 10px;
Modified: trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
===================================================================
--- trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-06-11 17:54:25 UTC (rev 1128)
@@ -134,11 +134,11 @@
String skinParameter = "headerBackgroundColor";
tmp = (String) skin.getParameter(context, skinParameter);
- separatorData.setBgColor(HtmlColor.decode(tmp == null ? "#4169E1" : tmp).getRGB());
if (null == tmp || "".equals(tmp)) {
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
tmp = (String) defaultSkin.getParameter(context, skinParameter);
}
+ separatorData.setBgColor(HtmlColor.decode(tmp == null ? "#4169E1" : tmp).getRGB());
skinParameter = "overAllBackground";
tmp = (String) skin.getParameter(context, skinParameter);
Modified: trunk/richfaces/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -5,8 +5,8 @@
<f:verbatim><![CDATA[
.dr-stglpnl{
- border : 1px solid #678FC5;
- background-color : #BFD0E9;
+ border-width : 1px;
+ border-style: solid;
padding : 1px;
background-position : top right;
background-repeat : no-repeat;
@@ -16,23 +16,14 @@
.dr-stglpnl-h{
border-width: 1px;
border-style: solid;
- background-color : #224986;
- font-size : 11px;
- color : #ffffff;
cursor: pointer;
- font-weight : bold;
- font-family : verdana;
padding : 2px;
- background-image : url(coll_panel_bg.gif);
background-position : top left;
background-repeat : repeat-x;
}
.dr-stglpnl-b{
- font-size : 11px;
- color : #000000;
- font-family : verdana;
padding : 10px;
text-align : left;
vertical-align : top;
Modified: trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss
===================================================================
--- trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -58,12 +58,11 @@
<f:verbatim>
-.dr-tbpnl-cntnt{
+.dr-tbpnl-cntnt {
border-width: 1px;
border-style: solid;
font-size: 11px;
font-family: verdana;
- color: #000000;
vertical-align: top;
}
@@ -134,11 +133,11 @@
<u:style name="color" skin="tabDisabledTextColor"/>
</u:selector>
<f:verbatim>
-.dr-tbpnl-tb-sel{
+
+.dr-tbpnl-tb-sel {
border-width: 1px;
border-style: solid;
border-bottom : 0px;
- color : #000000;
background-repeat: repeat-x;
background-position: top;
cursor : default;
@@ -160,6 +159,7 @@
<u:selector name=".dr-tbpnl-cntnt">
<u:style name="background-color" skin="generalBackgroundColor"/>
+ <u:style name="color" skin="generalTextColor"/>
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
@@ -167,6 +167,7 @@
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.TabGradientB" />
</u:style>
+ <u:style name="color" skin="selectControlColor" />
</u:selector>
<u:selector name=".dr-tbpnl-tb-dsbl">
Modified: trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss
===================================================================
--- trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss 2007-06-11 17:41:18 UTC (rev 1127)
+++ trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss 2007-06-11 17:54:25 UTC (rev 1128)
@@ -43,9 +43,6 @@
.dr-tree-h-text {
width: 100%;
cursor: default;
- color : #000000;
- font-size : 11px;
- font-family : verdana;
padding : 1px 4px 1px 4px;
}
@@ -55,19 +52,16 @@
.dr-tree-i-sel {
padding : 0px 3px 0px 3px;
- border : 1px solid #678FC5;
+ border : 1px solid;
background-color : transparent;
+ background-position: top left;
+ background-repeat: repeat-x;
}
.dr-tree-i-hl {
text-decoration: underline;
- color : #678FC5;
}
-.dr-tree-i-sel .dr-tree-i-hl {
- color : red;
-}
-
.dr-tree-pointer-cursor {
cursor: pointer;
}
@@ -91,8 +85,6 @@
<u:selector name=".dr-tree-i-sel">
<u:style name="border-color" skin="headerBackgroundColor" />
- <u:style name="background-position" value="top left"/>
- <u:style name="background-repeat" value="repeat-x"/>
<u:style name="color" skin="panelTextColor" />
</u:selector>
@@ -121,4 +113,9 @@
<f:resource f:key="org.richfaces.renderkit.html.images.TreeLineCollapsedImage"/>
</u:style>
</u:selector>
+
+<u:selector name=".dr-tree-i-sel .dr-tree-i-hl">
+ <u:style name="color" skin="selectControlColor" />
+</u:selector>
+
</f:template>
\ No newline at end of file
17 years, 7 months