diff options
author | Andrew C. Oliver <acoliver@apache.org> | 2002-06-22 20:54:14 +0000 |
---|---|---|
committer | Andrew C. Oliver <acoliver@apache.org> | 2002-06-22 20:54:14 +0000 |
commit | 6d66d9e26a96eb50821c1020be3394bd9a9f2276 (patch) | |
tree | 601d63fb3c0c33efdc2dd2a7cf440e6f38211833 /src/contrib | |
parent | 298f39d2281f8d28ec80942c1c2a57e81eaa3bf1 (diff) | |
download | poi-6d66d9e26a96eb50821c1020be3394bd9a9f2276.tar.gz poi-6d66d9e26a96eb50821c1020be3394bd9a9f2276.zip |
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
Diffstat (limited to 'src/contrib')
3 files changed, 10 insertions, 3 deletions
diff --git a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java index e1cddc1e2b..0c45069305 100644 --- a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java +++ b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java @@ -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); } diff --git a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableModel.java b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableModel.java index 6cbce80007..ada60a8400 100644 --- a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableModel.java +++ b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableModel.java @@ -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 { } -}
\ No newline at end of file +} diff --git a/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java b/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java index 157d7f5320..ba38f5ea60 100644 --- a/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java +++ b/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java @@ -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"); |