📄 columninforecord.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: ColumnInfoRecord.java
package jxl.write.biff;
import jxl.biff.FormattingRecords;
import jxl.biff.IndexMapping;
import jxl.biff.IntegerHelper;
import jxl.biff.Type;
import jxl.biff.WritableRecordData;
import jxl.biff.XFRecord;
class ColumnInfoRecord extends WritableRecordData
{
private byte data[];
private int column;
private XFRecord style;
private int xfIndex;
private int width;
private boolean hidden;
public ColumnInfoRecord(int col, int w, XFRecord xf)
{
super(Type.COLINFO);
column = col;
width = w;
style = xf;
xfIndex = style.getXFIndex();
hidden = false;
}
public ColumnInfoRecord(ColumnInfoRecord cir)
{
super(Type.COLINFO);
column = cir.column;
width = cir.width;
style = cir.style;
xfIndex = cir.xfIndex;
hidden = cir.hidden;
}
public ColumnInfoRecord(jxl.read.biff.ColumnInfoRecord cir, int col, FormattingRecords fr)
{
super(Type.COLINFO);
column = col;
width = cir.getWidth();
xfIndex = cir.getXFIndex();
style = fr.getXFRecord(xfIndex);
}
public ColumnInfoRecord(jxl.read.biff.ColumnInfoRecord cir, int col)
{
super(Type.COLINFO);
column = col;
width = cir.getWidth();
xfIndex = cir.getXFIndex();
}
public int getColumn()
{
return column;
}
public void incrementColumn()
{
column++;
}
public void decrementColumn()
{
column--;
}
int getWidth()
{
return width;
}
void setWidth(int w)
{
width = w;
}
public byte[] getData()
{
data = new byte[12];
IntegerHelper.getTwoBytes(column, data, 0);
IntegerHelper.getTwoBytes(column, data, 2);
IntegerHelper.getTwoBytes(width, data, 4);
IntegerHelper.getTwoBytes(xfIndex, data, 6);
int options = 6;
if(hidden)
options |= 0x1;
IntegerHelper.getTwoBytes(options, data, 8);
return data;
}
public XFRecord getCellFormat()
{
return style;
}
public void setCellFormat(XFRecord xfr)
{
style = xfr;
}
public int getXfIndex()
{
return xfIndex;
}
void rationalize(IndexMapping xfmapping)
{
xfIndex = xfmapping.getNewIndex(xfIndex);
}
void setHidden(boolean h)
{
hidden = h;
}
boolean getHidden()
{
return hidden;
}
public boolean equals(Object o)
{
if(o == this)
return true;
if(!(o instanceof ColumnInfoRecord))
return false;
ColumnInfoRecord cir = (ColumnInfoRecord)o;
if(column != cir.column || xfIndex != cir.xfIndex || width != cir.width || hidden != cir.hidden)
return false;
if(style == null && cir.style != null || style != null && cir.style == null)
return false;
else
return style.equals(cir.style);
}
public int hashCode()
{
int hashValue = 137;
int oddPrimeNumber = 79;
hashValue = hashValue * oddPrimeNumber + column;
hashValue = hashValue * oddPrimeNumber + xfIndex;
hashValue = hashValue * oddPrimeNumber + width;
hashValue = hashValue * oddPrimeNumber + (hidden ? 1 : 0);
if(style != null)
hashValue ^= style.hashCode();
return hashValue;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -