mirror of https://github.com/apache/poi.git
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
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@629742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f99adefb36
commit
d561e7b60a
|
@ -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 @@ public class SVRowHeader extends JList {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -20,11 +20,9 @@ package org.apache.poi.hssf.contrib.view;
|
|||
|
||||
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.*;
|
||||
|
|
|
@ -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 javax.swing.border.*;
|
|||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,13 +23,10 @@ package org.apache.poi.hssf.contrib.view;
|
|||
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
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.awt.event.*;
|
|||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
|
||||
|
|
Loading…
Reference in New Issue