diff options
author | Andrew C. Oliver <acoliver@apache.org> | 2002-07-04 14:47:36 +0000 |
---|---|---|
committer | Andrew C. Oliver <acoliver@apache.org> | 2002-07-04 14:47:36 +0000 |
commit | bcf0c1921c8fac5f806aa7df14cbd096f8c03219 (patch) | |
tree | af1aeffdb0313012eede8a7fdf2164f80967fe57 /src/contrib | |
parent | 3d9d57048909995d1cc0b1203623a6fb7aa0a08e (diff) | |
download | poi-bcf0c1921c8fac5f806aa7df14cbd096f8c03219.tar.gz poi-bcf0c1921c8fac5f806aa7df14cbd096f8c03219.zip |
double border
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352754 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/contrib')
-rw-r--r-- | src/contrib/src/org/apache/poi/hssf/contrib/view/SVBorder.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVBorder.java b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVBorder.java index edec319ef6..c786f5a86d 100644 --- a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVBorder.java +++ b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVBorder.java @@ -56,6 +56,7 @@ public class SVBorder extends AbstractBorder { paintNormalBorders(g, x, y, width, height); paintDottedBorders(g, x, y, width, height); paintDashedBorders(g, x, y, width, height); + paintDoubleBorders(g, x, y, width, height); @@ -281,6 +282,56 @@ public class SVBorder extends AbstractBorder { } } + + private void paintDoubleBorders(Graphics g, int x, int y, int width, + int height) { + if (northBorder && + northBorderType == HSSFCellStyle.BORDER_DOUBLE) { + + g.setColor(northColor); + + g.drawLine(x,y,width,y); + g.drawLine(x+3,y+2,width-3,y+2); + } + + if (eastBorder && + eastBorderType == HSSFCellStyle.BORDER_DOUBLE + ) { + + int thickness = getThickness(eastBorderType); + thickness++; //need for dotted borders to show up east + + g.setColor(eastColor); + + g.drawLine(width-1,y,width-1,height); + g.drawLine(width-3,y+3,width-3,height-3); + } + + if (southBorder && + southBorderType == HSSFCellStyle.BORDER_DOUBLE + ) { + + g.setColor(southColor); + + + g.drawLine(x,height - 1,width,height - 1); + g.drawLine(x+3,height - 3,width-3,height - 3); + } + + if (westBorder && + westBorderType == HSSFCellStyle.BORDER_DOUBLE + ) { + + int thickness = getThickness(westBorderType); +// thickness++; + + g.setColor(westColor); + + g.drawLine(x,y,x,height); + g.drawLine(x+2,y+2,x+2,height-3); + } + } + private int getThickness(int thickness) { int retval=1; switch (thickness) { |