poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r629742 - in /poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view: SVRowHeader.java SVTableCellEditor.java SVTableCellRenderer.java SViewer.java SViewerPanel.java
Date Thu, 21 Feb 2008 10:49:28 GMT
Author: nick
Date: Thu Feb 21 02:49:25 2008
New Revision: 629742

URL: http://svn.apache.org/viewvc?rev=629742&view=rev
Log:
Use the right way to figure out how many rows on a sheet, so we display the row number for
all of them on the left hand side. Also, tidy up some imports

Modified:
    poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java
    poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellEditor.java
    poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java
    poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java
    poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java

Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java?rev=629742&r1=629741&r2=629742&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java Thu Feb 21
02:49:25 2008
@@ -21,11 +21,8 @@
 package org.apache.poi.hssf.contrib.view;
 
 import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
 import javax.swing.*;
 import javax.swing.table.*;
-import javax.swing.event.*;
 
 import org.apache.poi.hssf.usermodel.*;
 
@@ -47,7 +44,9 @@
       this.sheet = sheet;
     }
 
-    public int getSize() { return sheet.getPhysicalNumberOfRows(); }
+    public int getSize() {
+    	return sheet.getLastRowNum() + 1;
+    }
     public Object getElementAt(int index) {
       return Integer.toString(index+1);
     }

Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellEditor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellEditor.java?rev=629742&r1=629741&r2=629742&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellEditor.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellEditor.java Thu
Feb 21 02:49:25 2008
@@ -20,11 +20,9 @@
 
 import java.awt.*;
 import java.awt.event.*;
-import java.text.*;
 import java.util.*;
 
 import javax.swing.*;
-import javax.swing.border.*;
 import javax.swing.table.*;
 
 import org.apache.poi.hssf.usermodel.*;

Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java?rev=629742&r1=629741&r2=629742&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java Thu
Feb 21 02:49:25 2008
@@ -19,8 +19,6 @@
 
 package org.apache.poi.hssf.contrib.view;
 
-import java.util.Hashtable;
-
 import javax.swing.*;
 import javax.swing.table.TableCellRenderer;
 import javax.swing.border.*;
@@ -28,14 +26,11 @@
 import java.awt.Component;
 import java.awt.Color;
 import java.awt.Rectangle;
-import java.awt.Font;
 
 import java.io.Serializable;
 import java.text.*;
 
 import org.apache.poi.hssf.usermodel.*;
-import org.apache.poi.hssf.util.HSSFColor;
-
 
 
 /**

Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java?rev=629742&r1=629741&r2=629742&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java Thu Feb 21 02:49:25
2008
@@ -23,13 +23,10 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.net.*;
-import java.applet.*;
 import java.io.*;
 import javax.swing.*;
 
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.hssf.usermodel.HSSFSheet;
-import org.apache.poi.hssf.usermodel.HSSFCell;
 
 /**
  * Sheet Viewer - Views XLS files via HSSF.  Can be used as an applet with

Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java?rev=629742&r1=629741&r2=629742&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java Thu Feb 21
02:49:25 2008
@@ -25,7 +25,6 @@
 import java.io.*;
 import javax.swing.*;
 import javax.swing.table.*;
-import javax.swing.event.*;
 
 import org.apache.poi.hssf.usermodel.*;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message