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;
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);
}
}

View File

@ -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);
}
}