A little more work to improve suckyviewer

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352715 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-06-22 20:54:14 +00:00
parent d6ec53d310
commit 63cfe59acc
3 changed files with 10 additions and 3 deletions

View File

@ -142,7 +142,7 @@ public class SVTableCellRenderer extends JLabel
Font font = new Font(f.getFontName(),fontstyle,f.getFontHeightInPoints());
setFont(font);
HSSFColor clr = null;
if (s.getFillPattern() == HSSFCellStyle.SOLID_FOREGROUND) {
@ -155,6 +155,11 @@ public class SVTableCellRenderer extends JLabel
setBackground(awtcolor);
clr = (HSSFColor)colors.get(new Integer(f.getColor()));
if (clr == null) clr = new HSSFColor.BLACK();
rgb = clr.getTriplet();
awtcolor = new Color(rgb[0],rgb[1],rgb[2]);
setForeground(awtcolor);
}

View File

@ -91,7 +91,7 @@ public class SVTableModel extends AbstractTableModel {
public int getColumnCount() {
return this.maxcol;
return this.maxcol+1;
}
public Object getValueAt(int row, int col) {
HSSFRow r = st.getRow(row);
@ -110,4 +110,4 @@ public class SVTableModel extends AbstractTableModel {
}
}
}

View File

@ -109,6 +109,8 @@ public class SViewer extends Applet {
boolean isurl = false;
if (filename == null) filename = getParameter("filename");
System.out.println("filename="+filename);
System.out.println("start="+filename.substring(0,7));
if (filename == null || filename.substring(0,7).equals("http://")) {
isurl = true;
if (filename == null) filename = getParameter("url");