📄 sheetsettings.java
字号:
}
/**
* Accessor for the vertical print resolution
*
* @return the vertical print resolution
*/
public int getVerticalPrintResolution()
{
return verticalPrintResolution;
}
/**
* Sets the right margin
*
* @param m the right margin in inches
*/
public void setRightMargin(double m)
{
rightMargin = m;
}
/**
* Accessor for the right margin
*
* @return the right margin in inches
*/
public double getRightMargin()
{
return rightMargin;
}
/**
* Sets the left margin
*
* @param m the left margin in inches
*/
public void setLeftMargin(double m)
{
leftMargin = m;
}
/**
* Accessor for the left margin
*
* @return the left margin in inches
*/
public double getLeftMargin()
{
return leftMargin;
}
/**
* Sets the top margin
*
* @param m the top margin in inches
*/
public void setTopMargin(double m)
{
topMargin = m;
}
/**
* Accessor for the top margin
*
* @return the top margin in inches
*/
public double getTopMargin()
{
return topMargin;
}
/**
* Sets the bottom margin
*
* @param m the bottom margin in inches
*/
public void setBottomMargin(double m)
{
bottomMargin = m;
}
/**
* Accessor for the bottom margin
*
* @return the bottom margin in inches
*/
public double getBottomMargin()
{
return bottomMargin;
}
/**
* Gets the default margin width
*
* @return the default margin width
*/
public double getDefaultWidthMargin()
{
return DEFAULT_WIDTH_MARGIN;
}
/**
* Gets the default margin height
*
* @return the default margin height
*/
public double getDefaultHeightMargin()
{
return DEFAULT_HEIGHT_MARGIN;
}
/**
* Accessor for the fit width print flag
* @return TRUE if the print is to fit to pages, false otherwise
*/
public boolean getFitToPages()
{
return fitToPages;
}
/**
* Accessor for the fit to pages flag
* @param b TRUE to fit to pages, FALSE to use a scale factor
*/
public void setFitToPages(boolean b)
{
fitToPages = b;
}
/**
* Accessor for the password
*
* @return the password to unlock this sheet, or NULL if not protected
*/
public String getPassword()
{
return password;
}
/**
* Sets the password for this sheet
*
* @param s the password
*/
public void setPassword(String s)
{
password = s;
}
/**
* Accessor for the password hash - used only when copying sheets
*
* @return passwordHash
*/
public int getPasswordHash()
{
return passwordHash;
}
/**
* Accessor for the password hash - used only when copying sheets
*
* @param ph the password hash
*/
public void setPasswordHash(int ph)
{
passwordHash = ph;
}
/**
* Accessor for the default column width
*
* @return the default column width, in characters
*/
public int getDefaultColumnWidth()
{
return defaultColumnWidth;
}
/**
* Sets the default column width
*
* @param w the new default column width
*/
public void setDefaultColumnWidth(int w)
{
defaultColumnWidth = w;
}
/**
* Accessor for the default row height
*
* @return the default row height, in 1/20ths of a point
*/
public int getDefaultRowHeight()
{
return defaultRowHeight;
}
/**
* Sets the default row height
*
* @param h the default row height, in 1/20ths of a point
*/
public void setDefaultRowHeight(int h)
{
defaultRowHeight = h;
}
/**
* Accessor for the zoom factor. Do not confuse zoom factor (which relates
* to the on screen view) with scale factor (which refers to the scale factor
* when printing)
*
* @return the zoom factor as a percentage
*/
public int getZoomFactor()
{
return zoomFactor;
}
/**
* Sets the zoom factor. Do not confuse zoom factor (which relates
* to the on screen view) with scale factor (which refers to the scale factor
* when printing)
*
* @param zf the zoom factor as a percentage
*/
public void setZoomFactor(int zf)
{
zoomFactor = zf;
}
/**
* Accessor for the page break preview mangificaton factor.
* Do not confuse zoom factor or scale factor
*
* @return the page break preview magnification a percentage
*/
public int getPageBreakPreviewMagnification()
{
return pageBreakPreviewMagnification;
}
/**
* Accessor for the page break preview magnificaton factor.
* Do not confuse zoom factor or scale factor
*
* @param f the page break preview magnification as a percentage
*/
public void setPageBreakPreviewMagnification(int f)
{
pageBreakPreviewMagnification =f ;
}
/**
* Accessor for the nomral view magnificaton factor.
* Do not confuse zoom factor or scale factor
*
* @return the page break preview magnification a percentage
*/
public int getNormalMagnification()
{
return normalMagnification;
}
/**
* Accessor for the normal magnificaton factor.
* Do not confuse zoom factor or scale factor
*
* @param f the page break preview magnification as a percentage
*/
public void setNormalMagnification(int f)
{
normalMagnification = f ;
}
/**
* Accessor for the displayZeroValues property
*
* @return TRUE to display zero values, FALSE not to bother
*/
public boolean getDisplayZeroValues()
{
return displayZeroValues;
}
/**
* Sets the displayZeroValues property
*
* @param b TRUE to show zero values, FALSE not to bother
*/
public void setDisplayZeroValues(boolean b)
{
displayZeroValues = b;
}
/**
* Accessor for the showGridLines property
*
* @return TRUE if grid lines will be shown, FALSE otherwise
*/
public boolean getShowGridLines()
{
return showGridLines;
}
/**
* Sets the showGridLines property
*
* @param b TRUE to show grid lines on this sheet, FALSE otherwise
*/
public void setShowGridLines(boolean b)
{
showGridLines = b;
}
/**
* Accessor for the pageBreakPreview mode
*
* @return TRUE if page break preview is enabled, FALSE otherwise
*/
public boolean getPageBreakPreviewMode()
{
return pageBreakPreviewMode;
}
/**
* Sets the pageBreakPreviewMode property
*
* @param b TRUE to launch in page break preview mode, FALSE otherwise
*/
public void setPageBreakPreviewMode(boolean b)
{
pageBreakPreviewMode = b;
}
/**
* Accessor for the printGridLines property
*
* @return TRUE if grid lines will be printed, FALSE otherwise
*/
public boolean getPrintGridLines()
{
return printGridLines;
}
/**
* Sets the printGridLines property
*
* @param b TRUE to print grid lines on this sheet, FALSE otherwise
*/
public void setPrintGridLines(boolean b)
{
printGridLines = b;
}
/**
* Accessor for the printHeaders property
*
* @return TRUE if headers will be printed, FALSE otherwise
*/
public boolean getPrintHeaders()
{
return printHeaders;
}
/**
* Sets the printHeaders property
*
* @param b TRUE to print headers on this sheet, FALSE otherwise
*/
public void setPrintHeaders(boolean b)
{
printHeaders = b;
}
/**
* Gets the row at which the pane is frozen horizontally
*
* @return the row at which the pane is horizontally frozen, or 0 if there
* is no freeze
*/
public int getHorizontalFreeze()
{
return horizontalFreeze;
}
/**
* Sets the row at which the pane is frozen horizontally
*
* @param row the row number to freeze at
*/
public void setHorizontalFreeze(int row)
{
horizontalFreeze = Math.max(row, 0);
}
/**
* Gets the column at which the pane is frozen vertically
*
* @return the column at which the pane is vertically frozen, or 0 if there
* is no freeze
*/
public int getVerticalFreeze()
{
return verticalFreeze;
}
/**
* Sets the row at which the pane is frozen vertically
*
* @param col the column number to freeze at
*/
public void setVerticalFreeze(int col)
{
verticalFreeze = Math.max(col, 0);
}
/**
* Sets the number of copies
*
* @param c the number of copies
*/
public void setCopies(int c)
{
copies = c;
}
/**
* Accessor for the number of copies to print
*
* @return the number of copies
*/
public int getCopies()
{
return copies;
}
/**
* Accessor for the header
*
* @return the header
*/
public HeaderFooter getHeader()
{
return header;
}
/**
* Sets the header
*
* @param h the header
*/
public void setHeader(HeaderFooter h)
{
header = h;
}
/**
* Sets the footer
*
* @param f the footer
*/
public void setFooter(HeaderFooter f)
{
footer = f;
}
/**
* Accessor for the footer
*
* @return the footer
*/
public HeaderFooter getFooter()
{
return footer;
}
/**
* Accessor for the horizontal centre
*
* @return Returns the horizontalCentre.
*/
public boolean isHorizontalCentre()
{
return horizontalCentre;
}
/**
* Sets the horizontal centre
*
* @param horizCentre The horizontalCentre to set.
*/
public void setHorizontalCentre(boolean horizCentre)
{
this.horizontalCentre = horizCentre;
}
/**
* Accessor for the vertical centre
*
* @return Returns the verticalCentre.
*/
public boolean isVerticalCentre()
{
return verticalCentre;
}
/**
* Sets the vertical centre
*
* @param vertCentre The verticalCentre to set.
*/
public void setVerticalCentre(boolean vertCentre)
{
this.verticalCentre = vertCentre;
}
/**
* Sets the automatic formula calculation flag
*
* @param auto - TRUE to automatically calculate the formulas,
* FALSE otherwise
*/
public void setAutomaticFormulaCalculation(boolean auto)
{
automaticFormulaCalculation = auto;
}
/**
* Retrieves the automatic formula calculation flag
*
* @return TRUE if formulas are calculated automatically, FALSE if they
* are calculated manually
*/
public boolean getAutomaticFormulaCalculation()
{
return automaticFormulaCalculation;
}
/**
* Sets the recalculate formulas when the sheet is saved flag
*
* @param recalc - TRUE to automatically calculate the formulas when the,
* spreadsheet is saved, FALSE otherwise
*/
public void setRecalculateFormulasBeforeSave(boolean recalc)
{
recalculateFormulasBeforeSave = recalc;
}
/**
* Retrieves the recalculate formulas before save flag
*
* @return TRUE if formulas are calculated before the sheet is saved,
* FALSE otherwise
*/
public boolean getRecalculateFormulasBeforeSave()
{
return recalculateFormulasBeforeSave;
}
/**
* Sets the print area for this sheet
*
* @param firstCol the first column of the print area
* @param firstRow the first row of the print area
* @param lastCol the last column of the print area
* @param lastRow the last row of the print area
*/
public void setPrintArea(int firstCol,
int firstRow,
int lastCol,
int lastRow)
{
printArea = new SheetRangeImpl(sheet, firstCol, firstRow,
lastCol, lastRow);
}
/**
* Accessor for the print area
*
* @return the print area, or NULL if one is not defined for this sheet
*/
public Range getPrintArea()
{
return printArea;
}
/**
* Sets both of the print titles for this sheet
*
* @param firstRow the first row of the print row titles
* @param lastRow the last row of the print row titles
* @param firstCol the first column of the print column titles
* @param lastCol the last column of the print column titles
*/
public void setPrintTitles(int firstRow,
int lastRow,
int firstCol,
int lastCol)
{
setPrintTitlesRow(firstRow, lastRow);
setPrintTitlesCol(firstCol, lastCol);
}
/**
* Sets the print row titles for this sheet
*
* @param firstRow the first row of the print titles
* @param lastRow the last row of the print titles
*/
public void setPrintTitlesRow(int firstRow,
int lastRow)
{
printTitlesRow = new SheetRangeImpl(sheet, 0, firstRow,
255, lastRow);
}
/**
* Sets the print column titles for this sheet
*
* @param firstRow the first row of the print titles
* @param lastRow the last row of the print titles
*/
public void setPrintTitlesCol(int firstCol,
int lastCol)
{
printTitlesCol = new SheetRangeImpl(sheet, firstCol, 0,
lastCol, 65535);
}
/**
* Accessor for the print row titles
*
* @return the print row titles, or NULL if one is not defined for this sheet
*/
public Range getPrintTitlesRow()
{
return printTitlesRow;
}
/**
* Accessor for the print column titles
*
* @return the print column titles, or NULL if one is not defined for this
* sheet
*/
public Range getPrintTitlesCol()
{
return printTitlesCol;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -