basic dump view

This commit is contained in:
honfika
2014-06-21 20:36:55 +02:00
parent 6232a141b7
commit a0804e2cb9
112 changed files with 2082 additions and 1954 deletions
@@ -16,6 +16,9 @@
*/
package com.jpexs.decompiler.flash.dumpview;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author JPEXS
@@ -23,28 +26,45 @@ package com.jpexs.decompiler.flash.dumpview;
public class DumpInfo {
public String name;
public String type;
public Object previewValue;
public int startByte;
public long startByte;
public int startBit;
public int lengthBytes;
public long lengthBytes;
public int lengthBits;
public DumpInfo(int startByte, int lengthBytes) {
public DumpInfo parent;
public List<DumpInfo> childInfos = new ArrayList<>();
public DumpInfo(String name, String type, Object value, long startByte, int lengthBytes) {
this.name = name;
this.type = type;
this.previewValue = value;
this.startByte = startByte;
this.lengthBytes = lengthBytes;
}
public DumpInfo(int startByte, int startBit, int lengthBytes, int lengthBits) {
public DumpInfo(String name, String type, Object value, long startByte, int startBit, long lengthBytes, int lengthBits) {
this.name = name;
this.type = type;
this.previewValue = value;
this.startByte = startByte;
this.lengthBytes = lengthBytes;
this.startBit = startBit;
this.lengthBits = lengthBits;
}
@Override
public String toString() {
String value = previewValue == null ? "" : previewValue.toString();
return name + "(" + type + ")" + (value.isEmpty() ? "" : " = " + value);
}
}
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.dumpview;
import java.util.List;
/**
*
* @author JPEXS
*/
public interface Dumpable {
public List<DumpInfo> getNeededCharacters();
}
@@ -1,39 +0,0 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.dumpview;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
/**
*
* @author JPEXS
*/
public class DumpableItem implements TreeItem {
private final SWF swf;
public DumpableItem(SWF swf) {
this.swf = swf;
}
@Override
public SWF getSwf() {
return swf;
}
}
@@ -1,36 +0,0 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.dumpview;
import com.jpexs.decompiler.flash.treenodes.TreeNode;
/**
*
* @author JPEXS
*/
public class DumpableNode extends TreeNode {
public DumpableNode(DumpableItem item) {
super(item);
}
@Override
public DumpableItem getItem() {
return (DumpableItem) item;
}
}