⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zpage.java

📁 用Java写的报表.功能如下: 0.内建网络打印,网络预览功能! 1.文件操作。包括url 指定的文件。 2.全功能打印支持。包括打印预览。 3.Undo 和 redo。 4.合并单元格。 5.Cel
💻 JAVA
字号:
package ezcell;import java.io.Writer;import java.io.OutputStreamWriter;import java.io.IOException;import java.awt.Color;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.print.*;import java.awt.print.Printable;import java.awt.print.PrinterJob;import java.io.FileOutputStream;import java.io.IOException;class ZPage implements Printable {    static ZPen gridPen = new ZPen(1, new Color(192, 192, 192));    private ZPrintableCells body;    private ZDocument doc;    /**     * put your documentation comment here     * @param     ZDocument doc     * @param     ZPrintableCells body     */    public ZPage(ZDocument doc, ZPrintableCells body) {        this.doc = doc;        this.body = body;    }    /**     * put your documentation comment here     * @return     */    public ZPrintableCells getBody() {        return body;    }    /**     * put your documentation comment here     * @return     */    public ZPrintableCells getFooter() {        return doc.getFooter();    }    /**     * put your documentation comment here     * @return     */    public ZPrintableCells getHeader() {        return doc.getHeader();    }    /**     * put your documentation comment here     * @return     */    public int getHeight() {        return (int) doc.getPageFormat().getHeight();    }    /**     * put your documentation comment here     * @return     */    public int getPageNumber() {        return doc.getPageNumber(this);    }    /**     * put your documentation comment here     * @return     */    public int getWidth() {        return (int) doc.getPageFormat().getWidth();    }    /**     * put your documentation comment here     * @param g     * @param pageFormat     * @param pageIndex     * @return     */    public int print(Graphics g, PageFormat pageFormat, int pageIndex) {        doc.setPage(this);        Graphics2D g2 = (Graphics2D) g;        doc.paint(g2);        return PAGE_EXISTS;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -