diff options
author | Glen Stampoultzis <glens@apache.org> | 2002-07-20 11:17:55 +0000 |
---|---|---|
committer | Glen Stampoultzis <glens@apache.org> | 2002-07-20 11:17:55 +0000 |
commit | e8437ec563557e36d207feb37b6abe0893c1ce2a (patch) | |
tree | 8243d24856a7dfb093e8a5c416d41ed4f1ecc086 /src | |
parent | e6358cc739f2e711611b12997b5a51cfecb0c1db (diff) | |
download | poi-e8437ec563557e36d207feb37b6abe0893c1ce2a.tar.gz poi-e8437ec563557e36d207feb37b6abe0893c1ce2a.zip |
Shawn's patch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352786 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/poi/hssf/model/Sheet.java | 31 | ||||
-rw-r--r-- | src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java | 18 |
2 files changed, 32 insertions, 17 deletions
diff --git a/src/java/org/apache/poi/hssf/model/Sheet.java b/src/java/org/apache/poi/hssf/model/Sheet.java index 2df1d79c6d..d4edac6b39 100644 --- a/src/java/org/apache/poi/hssf/model/Sheet.java +++ b/src/java/org/apache/poi/hssf/model/Sheet.java @@ -55,8 +55,6 @@ package org.apache.poi.hssf.model; -import java.io.OutputStream; - import java.util.List; import java.util.ArrayList; import java.util.Iterator; @@ -83,9 +81,10 @@ import org.apache.poi.hssf.record * <P> * @author Andrew C. Oliver (acoliver at apache dot org) * @author Glen Stampoultzis (glens at apache.org) + * @author Shawn Laubach (laubach at acm.org) Just Gridlines, Headers, Footers, and PrintSetup + * * @see org.apache.poi.hssf.model.Workbook * @see org.apache.poi.hssf.usermodel.HSSFSheet - * @author Shawn Laubach (laubach at acm.org) Just Gridlines, Headers, Footers, and PrintSetup * @version 1.0-pre */ @@ -1395,7 +1394,7 @@ public class Sheet { DeltaRecord retval = new DeltaRecord(); - retval.setMaxChange((( double ) 0.0010)); + retval.setMaxChange(0.0010); return retval; } @@ -1592,8 +1591,8 @@ public class Sheet retval.setOptions(( short ) 2); retval.setHResolution(( short ) 300); retval.setVResolution(( short ) 300); - retval.setHeaderMargin(( double ) 0.5); - retval.setFooterMargin(( double ) 0.5); + retval.setHeaderMargin( 0.5); + retval.setFooterMargin( 0.5); retval.setCopies(( short ) 0); return retval; } @@ -1966,7 +1965,7 @@ public class Sheet { return header; } - + /** * Sets the HeaderRecord. * @param newHeader The new HeaderRecord for the sheet. @@ -1975,7 +1974,7 @@ public class Sheet { header = newHeader; } - + /** * Returns the FooterRecord. * @return FooterRecord for the sheet. @@ -1984,7 +1983,7 @@ public class Sheet { return footer; } - + /** * Sets the FooterRecord. * @param newFooter The new FooterRecord for the sheet. @@ -1993,7 +1992,7 @@ public class Sheet { footer = newFooter; } - + /** * Returns the PrintSetupRecord. * @return PrintSetupRecord for the sheet. @@ -2011,7 +2010,7 @@ public class Sheet { printSetup = newPrintSetup; } - + /** * Returns the PrintGridlinesRecord. * @return PrintGridlinesRecord for the sheet. @@ -2020,7 +2019,7 @@ public class Sheet { return printGridlines; } - + /** * Sets the PrintGridlinesRecord. * @param newPrintGridlines The new PrintGridlinesRecord for the sheet. @@ -2030,4 +2029,12 @@ public class Sheet printGridlines = newPrintGridlines; } + /** + * Sets whether the sheet is selected + * @param sel True to select the sheet, false otherwise. + */ + public void setSelected(boolean sel) { + WindowTwoRecord windowTwo = (WindowTwoRecord) findFirstRecordBySid(WindowTwoRecord.sid); + windowTwo.setSelected(sel); + } } diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index 34b0d45e55..7e18a271d6 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -759,7 +759,7 @@ public class HSSFSheet public boolean isPrintGridlines() { return getSheet().getPrintGridlines().getPrintGridlines(); } - + /** * Turns on or off the printing of gridlines. * @param newPrintGridlines boolean to turn on or off the printing of @@ -768,7 +768,7 @@ public class HSSFSheet public void setPrintGridlines(boolean newPrintGridlines) { getSheet().getPrintGridlines().setPrintGridlines(newPrintGridlines); } - + /** * Gets the print setup object. * @return The user model for the print setup object. @@ -776,7 +776,7 @@ public class HSSFSheet public HSSFPrintSetup getPrintSetup() { return new HSSFPrintSetup(getSheet().getPrintSetup()); } - + /** * Gets the user model for the document header. * @return The Document header. @@ -784,12 +784,20 @@ public class HSSFSheet public HSSFHeader getHeader() { return new HSSFHeader(getSheet().getHeader()); } - + /** * Gets the user model for the document footer. * @return The Document footer. */ public HSSFFooter getFooter() { return new HSSFFooter(getSheet().getFooter()); - } + } + /** + * Sets whether sheet is selected. + * @param sel Whether to select the sheet or deselect the sheet. + */ + public void setSelected(boolean sel) { + getSheet().setSelected(sel); + + } } |