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

📄 numberrecord.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:   NumberRecord.java

package jxl.write.biff;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import jxl.CellType;
import jxl.NumberCell;
import jxl.biff.*;
import jxl.format.CellFormat;

// Referenced classes of package jxl.write.biff:
//            CellValue

public abstract class NumberRecord extends CellValue
{

    private double value;
    private NumberFormat format;
    private static DecimalFormat defaultFormat = new DecimalFormat("#.###");

    protected NumberRecord(int c, int r, double val)
    {
        super(Type.NUMBER, c, r);
        value = val;
    }

    protected NumberRecord(int c, int r, double val, CellFormat st)
    {
        super(Type.NUMBER, c, r, st);
        value = val;
    }

    protected NumberRecord(NumberCell nc)
    {
        super(Type.NUMBER, nc);
        value = nc.getValue();
    }

    protected NumberRecord(int c, int r, NumberRecord nr)
    {
        super(Type.NUMBER, c, r, nr);
        value = nr.value;
    }

    public CellType getType()
    {
        return CellType.NUMBER;
    }

    public byte[] getData()
    {
        byte celldata[] = super.getData();
        byte data[] = new byte[celldata.length + 8];
        System.arraycopy(celldata, 0, data, 0, celldata.length);
        DoubleHelper.getIEEEBytes(value, data, celldata.length);
        return data;
    }

    public String getContents()
    {
        if(format == null)
        {
            format = ((XFRecord)getCellFormat()).getNumberFormat();
            if(format == null)
                format = defaultFormat;
        }
        return format.format(value);
    }

    public double getValue()
    {
        return value;
    }

    public void setValue(double val)
    {
        value = val;
    }

    public NumberFormat getNumberFormat()
    {
        return null;
    }

}

⌨️ 快捷键说明

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