📄 eschercontainer.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: EscherContainer.java
package jxl.biff.drawing;
import common.Logger;
import java.util.ArrayList;
import java.util.Iterator;
// Referenced classes of package jxl.biff.drawing:
// EscherRecord, EscherRecordData, Dgg, Dg,
// BStoreContainer, SpgrContainer, SpContainer, Spgr,
// Sp, ClientAnchor, ClientData, BlipStoreEntry,
// Opt, SplitMenuColors, ClientTextBox, EscherAtom,
// EscherRecordType
class EscherContainer extends EscherRecord
{
private static Logger logger;
private boolean initialized;
private ArrayList children;
static Class class$jxl$biff$drawing$EscherContainer; /* synthetic field */
public EscherContainer(EscherRecordData erd)
{
super(erd);
initialized = false;
children = new ArrayList();
}
protected EscherContainer(EscherRecordType type)
{
super(type);
setContainer(true);
children = new ArrayList();
}
public EscherRecord[] getChildren()
{
if(!initialized)
initialize();
Object ca[] = children.toArray(new EscherRecord[children.size()]);
return (EscherRecord[])ca;
}
public void add(EscherRecord child)
{
children.add(child);
}
public void remove(EscherRecord child)
{
boolean result = children.remove(child);
}
private void initialize()
{
int curpos = getPos() + 8;
int endpos = Math.min(getPos() + getLength(), getStreamLength());
EscherRecord newRecord = null;
for(; curpos < endpos; curpos += newRecord.getLength())
{
EscherRecordData erd = new EscherRecordData(getEscherStream(), curpos);
EscherRecordType type = erd.getType();
if(type == EscherRecordType.DGG)
newRecord = new Dgg(erd);
else
if(type == EscherRecordType.DG)
newRecord = new Dg(erd);
else
if(type == EscherRecordType.BSTORE_CONTAINER)
newRecord = new BStoreContainer(erd);
else
if(type == EscherRecordType.SPGR_CONTAINER)
newRecord = new SpgrContainer(erd);
else
if(type == EscherRecordType.SP_CONTAINER)
newRecord = new SpContainer(erd);
else
if(type == EscherRecordType.SPGR)
newRecord = new Spgr(erd);
else
if(type == EscherRecordType.SP)
newRecord = new Sp(erd);
else
if(type == EscherRecordType.CLIENT_ANCHOR)
newRecord = new ClientAnchor(erd);
else
if(type == EscherRecordType.CLIENT_DATA)
newRecord = new ClientData(erd);
else
if(type == EscherRecordType.BSE)
newRecord = new BlipStoreEntry(erd);
else
if(type == EscherRecordType.OPT)
newRecord = new Opt(erd);
else
if(type == EscherRecordType.SPLIT_MENU_COLORS)
newRecord = new SplitMenuColors(erd);
else
if(type == EscherRecordType.CLIENT_TEXT_BOX)
newRecord = new ClientTextBox(erd);
else
newRecord = new EscherAtom(erd);
children.add(newRecord);
}
initialized = true;
}
byte[] getData()
{
if(!initialized)
initialize();
byte data[] = new byte[0];
Iterator i = children.iterator();
do
{
if(!i.hasNext())
break;
EscherRecord er = (EscherRecord)i.next();
byte childData[] = er.getData();
if(childData != null)
{
byte newData[] = new byte[data.length + childData.length];
System.arraycopy(data, 0, newData, 0, data.length);
System.arraycopy(childData, 0, newData, data.length, childData.length);
data = newData;
}
} while(true);
return setHeaderData(data);
}
static Class class$(String x0)
{
return Class.forName(x0);
ClassNotFoundException x1;
x1;
throw new NoClassDefFoundError(x1.getMessage());
}
static
{
logger = Logger.getLogger(class$jxl$biff$drawing$EscherContainer != null ? class$jxl$biff$drawing$EscherContainer : (class$jxl$biff$drawing$EscherContainer = class$("jxl.biff.drawing.EscherContainer")));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -