Render text during text editing and show old text in background with lighter color

This commit is contained in:
2014-12-19 22:45:45 +01:00
parent 20b4160024
commit b857f01cc9
8 changed files with 145 additions and 27 deletions
@@ -17,6 +17,7 @@
package com.jpexs.decompiler.flash.tags;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.SWFOutputStream;
import com.jpexs.decompiler.flash.tags.base.Exportable;
import com.jpexs.decompiler.flash.tags.base.NeedsCharacters;
@@ -336,6 +337,14 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable {
sos.write(originalRange.getArray(), originalRange.getPos(), originalRange.getLength());
}
}
public Tag cloneTag() throws InterruptedException, IOException {
byte[] data = getData();
SWFInputStream tagDataStream = new SWFInputStream(swf, data, getDataPos(), data.length);
TagStub copy = new TagStub(swf, getId(), "Unresolved", getOriginalRange(), tagDataStream);
copy.forceWriteAsLong = forceWriteAsLong;
return SWFInputStream.resolveTag(copy, 0, false, true, false);
}
/**
* Returns string representation of the object