📄 sheetsettings.java
字号:
*
* @param fw the number of pages
*/
public void setFitWidth(int fw)
{
fitWidth = fw;
fitToPages = true;
}
/**
* Accessor for the fit width
*
* @return the number of pages this sheet will be printed into widthwise
*/
public int getFitWidth()
{
return fitWidth;
}
/**
* Sets the number of pages vertically that this sheet will be printed into
*
* @param fh the number of pages this sheet will be printed into heightwise
*/
public void setFitHeight(int fh)
{
fitHeight = fh;
fitToPages = true;
}
/**
* Accessor for the fit height
*
* @return the number of pages this sheet will be printed into heightwise
*/
public int getFitHeight()
{
return fitHeight;
}
/**
* Sets the horizontal print resolution
*
* @param hpw the print resolution
*/
public void setHorizontalPrintResolution(int hpw)
{
horizontalPrintResolution = hpw;
}
/**
* Accessor for the horizontal print resolution
*
* @return the horizontal print resolution
*/
public int getHorizontalPrintResolution()
{
return horizontalPrintResolution;
}
/**
* Sets the vertical print reslution
*
* @param vpw the vertical print resolution
*/
public void setVerticalPrintResolution(int vpw)
{
verticalPrintResolution = vpw;
}
/**
* 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 defaultWidthMargin;
}
/**
* Gets the default margin height
*
* @return the default margin height
*/
public double getDefaultHeightMargin()
{
return defaultHeightMargin;
}
/**
* 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 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 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;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -