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

📄 setuprecord.java

📁 实现JAVA界面的代码GWT
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   SetupRecord.java

package jxl.write.biff;

import common.Logger;
import jxl.SheetSettings;
import jxl.biff.DoubleHelper;
import jxl.biff.IntegerHelper;
import jxl.biff.Type;
import jxl.biff.WritableRecordData;
import jxl.format.PageOrientation;
import jxl.format.PaperSize;

class SetupRecord extends WritableRecordData
{

    Logger logger;
    private byte data[];
    private double headerMargin;
    private double footerMargin;
    private PageOrientation orientation;
    private int paperSize;
    private int scaleFactor;
    private int pageStart;
    private int fitWidth;
    private int fitHeight;
    private int horizontalPrintResolution;
    private int verticalPrintResolution;
    private int copies;
    static Class class$jxl$write$biff$SetupRecord; /* synthetic field */

    public SetupRecord()
    {
        super(Type.SETUP);
        logger = Logger.getLogger(class$jxl$write$biff$SetupRecord != null ? class$jxl$write$biff$SetupRecord : (class$jxl$write$biff$SetupRecord = class$("jxl.write.biff.SetupRecord")));
        orientation = PageOrientation.PORTRAIT;
        headerMargin = 0.5D;
        footerMargin = 0.5D;
        paperSize = PaperSize.A4.getValue();
        horizontalPrintResolution = 300;
        verticalPrintResolution = 300;
        copies = 1;
    }

    public SetupRecord(SheetSettings s)
    {
        super(Type.SETUP);
        logger = Logger.getLogger(class$jxl$write$biff$SetupRecord != null ? class$jxl$write$biff$SetupRecord : (class$jxl$write$biff$SetupRecord = class$("jxl.write.biff.SetupRecord")));
        orientation = s.getOrientation();
        headerMargin = s.getHeaderMargin();
        footerMargin = s.getFooterMargin();
        paperSize = s.getPaperSize().getValue();
        horizontalPrintResolution = s.getHorizontalPrintResolution();
        verticalPrintResolution = s.getVerticalPrintResolution();
        fitWidth = s.getFitWidth();
        fitHeight = s.getFitHeight();
        pageStart = s.getPageStart();
        scaleFactor = s.getScaleFactor();
        copies = s.getCopies();
    }

    public SetupRecord(jxl.read.biff.SetupRecord sr)
    {
        super(Type.SETUP);
        logger = Logger.getLogger(class$jxl$write$biff$SetupRecord != null ? class$jxl$write$biff$SetupRecord : (class$jxl$write$biff$SetupRecord = class$("jxl.write.biff.SetupRecord")));
        orientation = sr.isPortrait() ? PageOrientation.PORTRAIT : PageOrientation.LANDSCAPE;
        paperSize = sr.getPaperSize();
        headerMargin = sr.getHeaderMargin();
        footerMargin = sr.getFooterMargin();
        scaleFactor = sr.getScaleFactor();
        pageStart = sr.getPageStart();
        fitWidth = sr.getFitWidth();
        fitHeight = sr.getFitHeight();
        horizontalPrintResolution = sr.getHorizontalPrintResolution();
        verticalPrintResolution = sr.getVerticalPrintResolution();
        copies = sr.getCopies();
    }

    public void setOrientation(PageOrientation o)
    {
        orientation = o;
    }

    public void setMargins(double hm, double fm)
    {
        headerMargin = hm;
        footerMargin = fm;
    }

    public void setPaperSize(PaperSize ps)
    {
        paperSize = ps.getValue();
    }

    public byte[] getData()
    {
        data = new byte[34];
        IntegerHelper.getTwoBytes(paperSize, data, 0);
        IntegerHelper.getTwoBytes(scaleFactor, data, 2);
        IntegerHelper.getTwoBytes(pageStart, data, 4);
        IntegerHelper.getTwoBytes(fitWidth, data, 6);
        IntegerHelper.getTwoBytes(fitHeight, data, 8);
        int options = 0;
        if(orientation == PageOrientation.PORTRAIT)
            options |= 0x2;
        if(pageStart != 0)
            options |= 0x80;
        IntegerHelper.getTwoBytes(options, data, 10);
        IntegerHelper.getTwoBytes(horizontalPrintResolution, data, 12);
        IntegerHelper.getTwoBytes(verticalPrintResolution, data, 14);
        DoubleHelper.getIEEEBytes(headerMargin, data, 16);
        DoubleHelper.getIEEEBytes(footerMargin, data, 24);
        IntegerHelper.getTwoBytes(copies, data, 32);
        return data;
    }

    static Class class$(String x0)
    {
        return Class.forName(x0);
        ClassNotFoundException x1;
        x1;
        throw new NoClassDefFoundError(x1.getMessage());
    }
}

⌨️ 快捷键说明

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