[jboss-svn-commits] JBL Code SVN: r35638 - labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Oct 21 07:41:04 EDT 2010


Author: ge0ffrey
Date: 2010-10-21 07:41:03 -0400 (Thu, 21 Oct 2010)
New Revision: 35638

Removed:
   labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/DataModel.java
   labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/RowData.java
Log:
DataModel and RowData are dead code (never used)

Deleted: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/DataModel.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/DataModel.java	2010-10-21 11:20:29 UTC (rev 35637)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/DataModel.java	2010-10-21 11:41:03 UTC (rev 35638)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2005 JBoss Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.guvnor.client.table;
-
-import com.google.gwt.user.client.ui.Widget;
-
-/**
- * An optional interface to provide widgets for the body of the grid.
- * @author Michael Neale
- *
- */
-public interface DataModel {
-
-    /**
-     * Must always provide a value. This is used for sorting (and display possibly).
-     */
-    public Comparable<String> getValue(int row,
-                                       int col);
-
-    /**
-     * optionally return a widget to display instead of the text. If null, then the text will be rendered.
-     */
-    public Widget getWidget(int row,
-                            int col);
-
-    public int getNumberOfRows();
-
-    public String getRowId(int row);
-
-}
\ No newline at end of file

Deleted: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/RowData.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/RowData.java	2010-10-21 11:20:29 UTC (rev 35637)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/RowData.java	2010-10-21 11:41:03 UTC (rev 35638)
@@ -1,91 +0,0 @@
-/**
- * Copyright 2010 JBoss Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.guvnor.client.table;
-/*
- * Copyright 2005 JBoss Inc
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-/** This is used to hold the data for sorting in a grid */
-public class RowData implements Comparable {
-	
-	List columnValues = new ArrayList();
-	int sortColIndex = 0;
-
-	public void addColumnValue(Comparable value){
-		this.columnValues.add(value);
-	}
-	
-	public void addColumnValue(int index, Comparable value){
-		if(index >= this.columnValues.size()){
-			addNullColumns(index);
-		}
-		this.columnValues.set(index, value);
-	}	
-
-	public Object getColumnValue(int index){
-		return this.columnValues.get(index);
-	}	
-	
-	public List getColumnValues() {
-		return columnValues;
-	}
-
-	public void setColumnValues(List columnValues) {
-		this.columnValues = columnValues;
-	}
-
-	public int getSortColIndex() {
-		return sortColIndex;
-	}
-
-	public void setSortColIndex(int sortColIndex) {
-		this.sortColIndex = sortColIndex;
-	}
-
-	public int compareTo(Object other) {
-		if(null == other){
-			return -1;
-		}
-		RowData otherRow = (RowData)other;
-		Comparable obj1 = (Comparable)this.getColumnValue(this.sortColIndex);
-		Comparable obj2 = (Comparable)otherRow.getColumnValue(this.sortColIndex);
-		return obj1.compareTo(obj2);
-	}
-	
-	private void addNullColumns(int index){
-		for(int nullIndex=this.columnValues.size(); nullIndex<=index; nullIndex++){
-			columnValues.add(null);
-		}
-	}
-}
\ No newline at end of file



More information about the jboss-svn-commits mailing list