Shawn's patch

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Glen Stampoultzis 2002-07-20 11:17:55 +00:00
parent 080d3bf414
commit f649d5bb21
2 changed files with 32 additions and 17 deletions

View File

@ -55,8 +55,6 @@
package org.apache.poi.hssf.model; package org.apache.poi.hssf.model;
import java.io.OutputStream;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
@ -83,9 +81,10 @@ import org.apache.poi.hssf.record
* <P> * <P>
* @author Andrew C. Oliver (acoliver at apache dot org) * @author Andrew C. Oliver (acoliver at apache dot org)
* @author Glen Stampoultzis (glens at apache.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.model.Workbook
* @see org.apache.poi.hssf.usermodel.HSSFSheet * @see org.apache.poi.hssf.usermodel.HSSFSheet
* @author Shawn Laubach (laubach at acm.org) Just Gridlines, Headers, Footers, and PrintSetup
* @version 1.0-pre * @version 1.0-pre
*/ */
@ -1395,7 +1394,7 @@ public class Sheet
{ {
DeltaRecord retval = new DeltaRecord(); DeltaRecord retval = new DeltaRecord();
retval.setMaxChange((( double ) 0.0010)); retval.setMaxChange(0.0010);
return retval; return retval;
} }
@ -1592,8 +1591,8 @@ public class Sheet
retval.setOptions(( short ) 2); retval.setOptions(( short ) 2);
retval.setHResolution(( short ) 300); retval.setHResolution(( short ) 300);
retval.setVResolution(( short ) 300); retval.setVResolution(( short ) 300);
retval.setHeaderMargin(( double ) 0.5); retval.setHeaderMargin( 0.5);
retval.setFooterMargin(( double ) 0.5); retval.setFooterMargin( 0.5);
retval.setCopies(( short ) 0); retval.setCopies(( short ) 0);
return retval; return retval;
} }
@ -2030,4 +2029,12 @@ public class Sheet
printGridlines = newPrintGridlines; 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);
}
} }

View File

@ -791,5 +791,13 @@ public class HSSFSheet
*/ */
public HSSFFooter getFooter() { public HSSFFooter getFooter() {
return new HSSFFooter(getSheet().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);
}
} }