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

📄 printerdata.java

📁 的说法科斯洛伐路上看到伐楼上的开发1科林麦克;
💻 JAVA
字号:
package org.loon.framework.ide.test.data;
/**
 * <p>Title: LoonFramework</p>
 * <p>Description:</p>
 * <p>Copyright: Copyright (c) 2007</p>
 * <p>Company: LoonFramework</p>
 * @author chenpeng  
 * @email:ceponline@yahoo.com.cn 
 * @version 0.1
 */
import java.awt.Font;
import java.awt.print.PageFormat;

public class PrinterData
{
	 int maxWidth;
	    int maxHeight;
	    int width;
	    int height;
	    int spaceTop;
	    int spaceBottom;
	    int spaceLeft;
	    int spaceRight;
	    int orientation;
	    Font font;
    public PrinterData(Font font1, PageFormat pageformat)
    {
        maxWidth = 400;
        maxHeight = 600;
        width = 400;
        height = 600;
        spaceTop = 20;
        spaceBottom = 10;
        spaceLeft = 20;
        spaceRight = 20;
        maxWidth = (int)pageformat.getWidth();
        maxHeight = (int)pageformat.getHeight();
        width = (int)pageformat.getImageableWidth();
        height = (int)pageformat.getImageableHeight();
        spaceTop = (int)pageformat.getImageableY() + font1.getSize();
        spaceBottom = (int)((double)height - ((double)spaceTop + pageformat.getImageableHeight()));
        spaceLeft = (int)pageformat.getImageableX();
        spaceRight = (int)((double)width - ((double)spaceLeft + pageformat.getImageableWidth()));
        orientation = pageformat.getOrientation();
    }

    public int getMaxWidth()
    {
        return maxWidth;
    }

    public int getMaxHeight()
    {
        return maxHeight;
    }

    public int getWidth()
    {
        return width;
    }

    public int getHeight()
    {
        return height;
    }

    public int getSpaceTop()
    {
        return spaceTop;
    }

    public int getSpaceBottom()
    {
        return spaceBottom;
    }

    public int getSpaceLeft()
    {
        return spaceLeft;
    }

    public int getSpaceRight()
    {
        return spaceRight;
    }

    public int getOrientation()
    {
        return orientation;
    }

   
}

⌨️ 快捷键说明

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