|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.record.RecordBase org.apache.poi.hssf.record.aggregates.RecordAggregate org.apache.poi.hssf.record.aggregates.PageSettingsBlock
public final class PageSettingsBlock
Groups the page settings records for a worksheet.
See OOO excelfileformat.pdf sec 4.4 'Page Settings Block'
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.poi.hssf.record.aggregates.RecordAggregate |
---|
RecordAggregate.PositionTrackingVisitor, RecordAggregate.RecordVisitor |
Constructor Summary | |
---|---|
PageSettingsBlock()
Creates a PageSettingsBlock with default settings |
|
PageSettingsBlock(RecordStream rs)
|
Method Summary | |
---|---|
void |
addLateHeaderFooter(HeaderFooterRecord rec)
HEADERFOOTER is new in 2007. |
void |
addLateRecords(RecordStream rs)
This method reads PageSettingsBlock records from the supplied RecordStream until the first non-PageSettingsBlock record is encountered. |
int[] |
getColumnBreaks()
|
FooterRecord |
getFooter()
Returns the FooterRecord. |
HCenterRecord |
getHCenter()
|
HeaderRecord |
getHeader()
Returns the HeaderRecord. |
double |
getMargin(short margin)
Gets the size of the margin in inches. |
int |
getNumColumnBreaks()
|
int |
getNumRowBreaks()
|
PrintSetupRecord |
getPrintSetup()
Returns the PrintSetupRecord. |
int[] |
getRowBreaks()
|
VCenterRecord |
getVCenter()
|
boolean |
isColumnBroken(int column)
Queries if the specified column has a page break |
static boolean |
isComponentRecord(int sid)
|
boolean |
isRowBroken(int row)
Queries if the specified row has a page break |
void |
positionRecords(java.util.List<RecordBase> sheetRecords)
Some apps can define multiple HeaderFooterRecord records for a sheet. |
void |
removeColumnBreak(int column)
Removes a page break at the indicated column |
void |
removeRowBreak(int row)
Removes a page break at the indicated row |
void |
setColumnBreak(short column,
short fromRow,
short toRow)
Sets a page break at the indicated column |
void |
setFooter(FooterRecord newFooter)
Sets the FooterRecord. |
void |
setHeader(HeaderRecord newHeader)
Sets the HeaderRecord. |
void |
setMargin(short margin,
double size)
Sets the size of the margin in inches. |
void |
setPrintSetup(PrintSetupRecord newPrintSetup)
Sets the PrintSetupRecord. |
void |
setRowBreak(int row,
short fromCol,
short toCol)
Sets a page break at the indicated row |
void |
shiftColumnBreaks(short startingCol,
short endingCol,
short count)
Shifts the vertical page breaks for the indicated count |
void |
shiftRowBreaks(int startingRow,
int endingRow,
int count)
Shifts the horizontal page breaks for the indicated count |
void |
visitContainedRecords(RecordAggregate.RecordVisitor rv)
Visit each of the atomic BIFF records contained in this RecordAggregate in the order
that they should be written to file. |
Methods inherited from class org.apache.poi.hssf.record.aggregates.RecordAggregate |
---|
getRecordSize, serialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageSettingsBlock(RecordStream rs)
public PageSettingsBlock()
Method Detail |
---|
public static boolean isComponentRecord(int sid)
true
if the specified Record sid is one belonging to the
'Page Settings Block'.public void setColumnBreak(short column, short fromRow, short toRow)
public void removeColumnBreak(int column)
public void visitContainedRecords(RecordAggregate.RecordVisitor rv)
RecordAggregate
RecordAggregate
in the order
that they should be written to file. Implementors may or may not return the actual
Record
s being used to manage POI's internal implementation. Callers should not
assume either way, and therefore only attempt to modify those Record
s after cloning
visitContainedRecords
in class RecordAggregate
public HeaderRecord getHeader()
public void setHeader(HeaderRecord newHeader)
newHeader
- The new HeaderRecord for the sheet.public FooterRecord getFooter()
public void setFooter(FooterRecord newFooter)
newFooter
- The new FooterRecord for the sheet.public PrintSetupRecord getPrintSetup()
public void setPrintSetup(PrintSetupRecord newPrintSetup)
newPrintSetup
- The new PrintSetupRecord for the sheet.public double getMargin(short margin)
margin
- which margin to get
public void setMargin(short margin, double size)
margin
- which margin to getsize
- the size of the marginpublic void setRowBreak(int row, short fromCol, short toCol)
row
- public void removeRowBreak(int row)
row
- public boolean isRowBroken(int row)
row
-
public boolean isColumnBroken(int column)
true
if the specified column has a page breakpublic void shiftRowBreaks(int startingRow, int endingRow, int count)
startingRow
- endingRow
- count
- public void shiftColumnBreaks(short startingCol, short endingCol, short count)
startingCol
- endingCol
- count
- public int[] getRowBreaks()
null
public int getNumRowBreaks()
public int[] getColumnBreaks()
null
public int getNumColumnBreaks()
public VCenterRecord getVCenter()
public HCenterRecord getHCenter()
public void addLateHeaderFooter(HeaderFooterRecord rec)
PageSettingsBlock
where it belongs.
public void addLateRecords(RecordStream rs)
RecordFormatException
- if any PSB record encountered has the same type (sid) as
a record that is already part of this PageSettingsBlockpublic void positionRecords(java.util.List<RecordBase> sheetRecords)
sheetRecords
- the list of sheet records read so far
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |