mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 14:20:43 +00:00
More documentation.
This commit is contained in:
@@ -33,50 +33,50 @@ import java.util.TreeMap;
|
||||
public class AS2Package implements TreeItem {
|
||||
|
||||
/**
|
||||
* SWF this package resides in.
|
||||
* SWF this package resides in
|
||||
*/
|
||||
private final SWF swf;
|
||||
|
||||
/**
|
||||
* Name.
|
||||
* Name
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Parent package.
|
||||
* Parent package
|
||||
*/
|
||||
private final AS2Package parent;
|
||||
|
||||
/**
|
||||
* Subpackges.
|
||||
* Subpackges
|
||||
*/
|
||||
public Map<String, AS2Package> subPackages = new TreeMap<>();
|
||||
|
||||
/**
|
||||
* Scripts in this package.
|
||||
* Scripts in this package
|
||||
*/
|
||||
public Map<String, ASMSource> scripts = new TreeMap<>();
|
||||
|
||||
/**
|
||||
* Whether the package is flat = in the format "mypkg.sub1.sub2" instead of
|
||||
* "sub1".
|
||||
* "sub1"
|
||||
*/
|
||||
private final boolean flat;
|
||||
|
||||
/**
|
||||
* Whether this is default package.
|
||||
* Whether this is default package
|
||||
*/
|
||||
private final boolean defaultPackage;
|
||||
|
||||
/**
|
||||
* Constructs AS2Package
|
||||
* Constructs AS2Package.
|
||||
*
|
||||
* @param name Name
|
||||
* @param parent Parent package
|
||||
* @param swf SWF this package resides in
|
||||
* @param flat Whether the package is flat = in the format "mypkg.sub1.sub2"
|
||||
* instead of "sub1"
|
||||
* @param defaultPackage
|
||||
* @param defaultPackage Default package
|
||||
*/
|
||||
public AS2Package(String name, AS2Package parent, SWF swf, boolean flat, boolean defaultPackage) {
|
||||
this.name = name;
|
||||
@@ -89,7 +89,7 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Checks whether it is default package.
|
||||
*
|
||||
* @return
|
||||
* @return Whether it is default package
|
||||
*/
|
||||
public boolean isDefaultPackage() {
|
||||
return defaultPackage;
|
||||
@@ -98,7 +98,7 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets openable.
|
||||
*
|
||||
* @return
|
||||
* @return Openable
|
||||
*/
|
||||
@Override
|
||||
public Openable getOpenable() {
|
||||
@@ -108,7 +108,7 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets all subpackages and subscripts.
|
||||
*
|
||||
* @return
|
||||
* @return All subpackages and subscripts
|
||||
*/
|
||||
public List<TreeItem> getAllChildren() {
|
||||
List<TreeItem> result = new ArrayList<>(getChildCount());
|
||||
@@ -120,8 +120,8 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets child at index.
|
||||
*
|
||||
* @param index
|
||||
* @return
|
||||
* @param index Index
|
||||
* @return Child at index
|
||||
*/
|
||||
public TreeItem getChild(int index) {
|
||||
if (index < subPackages.size()) {
|
||||
@@ -150,7 +150,7 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets child count.
|
||||
*
|
||||
* @return
|
||||
* @return Child count
|
||||
*/
|
||||
public int getChildCount() {
|
||||
return subPackages.size() + scripts.size();
|
||||
@@ -159,8 +159,8 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets index of child.
|
||||
*
|
||||
* @param child
|
||||
* @return
|
||||
* @param child Child
|
||||
* @return Index of child
|
||||
*/
|
||||
public int getIndexOfChild(TreeItem child) {
|
||||
int res = 0;
|
||||
@@ -185,11 +185,6 @@ public class AS2Package implements TreeItem {
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* ToString.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
@@ -198,7 +193,7 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets package name.
|
||||
*
|
||||
* @return
|
||||
* @return Package name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
@@ -207,7 +202,7 @@ public class AS2Package implements TreeItem {
|
||||
/**
|
||||
* Gets modified flag.
|
||||
*
|
||||
* @return
|
||||
* @return Modified flag
|
||||
*/
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
@@ -228,7 +223,7 @@ public class AS2Package implements TreeItem {
|
||||
* Checks whether the package is flat. Flat = in the format
|
||||
* "mypkg.sub1.sub2" instead of "sub1".
|
||||
*
|
||||
* @return
|
||||
* @return Whether the package is flat
|
||||
*/
|
||||
public boolean isFlat() {
|
||||
return flat;
|
||||
|
||||
@@ -36,17 +36,17 @@ import natorder.NaturalOrderComparator;
|
||||
public class AS3Package extends AS3ClassTreeItem {
|
||||
|
||||
/**
|
||||
* Openable.
|
||||
* Openable
|
||||
*/
|
||||
private final Openable openable;
|
||||
|
||||
/**
|
||||
* Package name.
|
||||
* Package name
|
||||
*/
|
||||
public String packageName;
|
||||
|
||||
/**
|
||||
* All subPackages.
|
||||
* All subPackages
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private final Map<String, AS3Package> subPackages = new TreeMap<>(new NaturalOrderComparator());
|
||||
@@ -58,23 +58,23 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
private final Map<String, ScriptPack> scripts = new TreeMap<>(new NaturalOrderComparator());
|
||||
|
||||
/**
|
||||
* Sorted packages.
|
||||
* Sorted packages
|
||||
*/
|
||||
private List<AS3Package> sortedPackages;
|
||||
|
||||
/**
|
||||
* Sorted scripts.
|
||||
* Sorted scripts
|
||||
*/
|
||||
private List<ScriptPack> sortedScripts;
|
||||
|
||||
/**
|
||||
* Whether the package is flat = in the format "mypkg.sub1.sub2" instead of
|
||||
* "sub1".
|
||||
* "sub1"
|
||||
*/
|
||||
private final boolean flat;
|
||||
|
||||
/**
|
||||
* Whether this is default package.
|
||||
* Whether this is default package
|
||||
*/
|
||||
private final boolean defaultPackage;
|
||||
|
||||
@@ -84,21 +84,22 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
private final Integer compoundScriptIndex;
|
||||
|
||||
/**
|
||||
* ABC.
|
||||
* ABC
|
||||
*/
|
||||
private final ABC abc;
|
||||
|
||||
/**
|
||||
* ScriptPack with compound script initializer.
|
||||
* ScriptPack with compound script initializer
|
||||
*/
|
||||
private ScriptPack compoundInitializerPack = null;
|
||||
|
||||
/**
|
||||
* Whether this package is part of compound script.
|
||||
* Whether this package is part of compound script
|
||||
*/
|
||||
private final boolean partOfCompoundScript;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param packageName Package name
|
||||
* @param openable Openable
|
||||
* @param flat Whether the package is flat = in the format "mypkg.sub1.sub2"
|
||||
@@ -124,7 +125,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Checks whether this package is part of compound script.
|
||||
*
|
||||
* @return
|
||||
* @return Whether this package is part of compound script
|
||||
*/
|
||||
public boolean isPartOfCompoundScript() {
|
||||
return partOfCompoundScript;
|
||||
@@ -133,7 +134,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Sets ScriptPack with compound script initializer.
|
||||
*
|
||||
* @param compoundInitializerPack
|
||||
* @param compoundInitializerPack ScriptPack
|
||||
*/
|
||||
public void setCompoundInitializerPack(ScriptPack compoundInitializerPack) {
|
||||
this.compoundInitializerPack = compoundInitializerPack;
|
||||
@@ -142,7 +143,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets ScriptPack with compound script initializer.
|
||||
*
|
||||
* @return
|
||||
* @return ScriptPack
|
||||
*/
|
||||
public ScriptPack getCompoundInitializerPack() {
|
||||
return compoundInitializerPack;
|
||||
@@ -151,7 +152,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Checks whether it is default package.
|
||||
*
|
||||
* @return
|
||||
* @return Whether it is default package
|
||||
*/
|
||||
public boolean isDefaultPackage() {
|
||||
return defaultPackage;
|
||||
@@ -161,7 +162,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
* Checks whether the package is flat. Flat = in the format
|
||||
* "mypkg.sub1.sub2" instead of "sub1".
|
||||
*
|
||||
* @return
|
||||
* @return Whether the package is flat
|
||||
*/
|
||||
public boolean isFlat() {
|
||||
return flat;
|
||||
@@ -170,7 +171,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Checks whether it is a compound script. Not just a part of it.
|
||||
*
|
||||
* @return
|
||||
* @return Whether it is a compound script
|
||||
*/
|
||||
public boolean isCompoundScript() {
|
||||
return compoundScriptIndex != null;
|
||||
@@ -179,7 +180,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets index of compound scriptInfo.
|
||||
*
|
||||
* @return
|
||||
* @return Index of compound scriptInfo
|
||||
*/
|
||||
public Integer getCompoundScriptIndex() {
|
||||
return compoundScriptIndex;
|
||||
@@ -188,7 +189,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets ABC.
|
||||
*
|
||||
* @return
|
||||
* @return ABC
|
||||
*/
|
||||
public ABC getAbc() {
|
||||
return abc;
|
||||
@@ -197,7 +198,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets Openable.
|
||||
*
|
||||
* @return
|
||||
* @return Openable
|
||||
*/
|
||||
@Override
|
||||
public Openable getOpenable() {
|
||||
@@ -207,7 +208,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets subpackages.
|
||||
*
|
||||
* @return
|
||||
* @return Subpackages
|
||||
*/
|
||||
public List<AS3Package> getSubPackages() {
|
||||
if (sortedPackages == null) {
|
||||
@@ -225,7 +226,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets ScriptPacks in this package.
|
||||
*
|
||||
* @return
|
||||
* @return ScriptPacks
|
||||
*/
|
||||
public List<ScriptPack> getScriptPacks() {
|
||||
if (sortedScripts == null) {
|
||||
@@ -243,7 +244,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Adds ScriptPack to the package.
|
||||
*
|
||||
* @param script
|
||||
* @param script ScriptPack
|
||||
*/
|
||||
public void addScriptPack(ScriptPack script) {
|
||||
ClassPath cp = script.getClassPath();
|
||||
@@ -254,7 +255,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Adds subpackage.
|
||||
*
|
||||
* @param subPackage
|
||||
* @param subPackage Subpackage
|
||||
*/
|
||||
public void addSubPackage(AS3Package subPackage) {
|
||||
subPackages.put(subPackage.getNameWithNamespaceSuffix(), subPackage);
|
||||
@@ -264,8 +265,8 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets subpackage by name.
|
||||
*
|
||||
* @param packageName
|
||||
* @return
|
||||
* @param packageName Package name
|
||||
* @return Subpackage
|
||||
*/
|
||||
public AS3Package getSubPackage(String packageName) {
|
||||
return subPackages.get(packageName);
|
||||
@@ -274,7 +275,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets all subpackages and scripts in this package.
|
||||
*
|
||||
* @return
|
||||
* @return All subpackages and scripts
|
||||
*/
|
||||
public List<AS3ClassTreeItem> getAllChildren() {
|
||||
List<AS3ClassTreeItem> result = new ArrayList<>(getChildCount());
|
||||
@@ -286,8 +287,8 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets child at index.
|
||||
*
|
||||
* @param index
|
||||
* @return
|
||||
* @param index Index
|
||||
* @return Child at index
|
||||
*/
|
||||
public AS3ClassTreeItem getChild(int index) {
|
||||
if (index < subPackages.size()) {
|
||||
@@ -304,7 +305,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets child count.
|
||||
*
|
||||
* @return
|
||||
* @return Child count
|
||||
*/
|
||||
public int getChildCount() {
|
||||
return subPackages.size() + getScriptPacks().size();
|
||||
@@ -313,8 +314,8 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets index of child.
|
||||
*
|
||||
* @param child
|
||||
* @return
|
||||
* @param child Child
|
||||
* @return Index of child
|
||||
*/
|
||||
public int getIndexOfChild(AS3ClassTreeItem child) {
|
||||
int res = 0;
|
||||
@@ -349,11 +350,6 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
sortedScripts = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* ToString
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
if (flat) {
|
||||
@@ -365,7 +361,7 @@ public class AS3Package extends AS3ClassTreeItem {
|
||||
/**
|
||||
* Gets modified flag.
|
||||
*
|
||||
* @return
|
||||
* @return Modified flag
|
||||
*/
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
|
||||
@@ -35,6 +35,11 @@ public class Clip {
|
||||
*/
|
||||
public int depth;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param shape Shape
|
||||
* @param depth Clipping depth
|
||||
*/
|
||||
public Clip(Shape shape, int depth) {
|
||||
this.shape = shape;
|
||||
this.depth = depth;
|
||||
|
||||
@@ -44,102 +44,102 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
public class DepthState {
|
||||
|
||||
/**
|
||||
* Depth.
|
||||
* Depth
|
||||
*/
|
||||
public int depth = -1;
|
||||
|
||||
/**
|
||||
* CharacterId.
|
||||
* CharacterId
|
||||
*/
|
||||
public int characterId = -1;
|
||||
|
||||
/**
|
||||
* Matrix.
|
||||
* Matrix
|
||||
*/
|
||||
public MATRIX matrix;
|
||||
|
||||
/**
|
||||
* Instance name.
|
||||
* Instance name
|
||||
*/
|
||||
public String instanceName;
|
||||
|
||||
/**
|
||||
* Class name.
|
||||
* Class name
|
||||
*/
|
||||
public String className;
|
||||
|
||||
/**
|
||||
* Color transform.
|
||||
* Color transform
|
||||
*/
|
||||
public ColorTransform colorTransForm;
|
||||
|
||||
/**
|
||||
* Whether to cache as bitmap.
|
||||
* Whether to cache as bitmap
|
||||
*/
|
||||
public boolean cacheAsBitmap = false;
|
||||
|
||||
/**
|
||||
* Blend mode.
|
||||
* Blend mode
|
||||
*/
|
||||
public int blendMode = 0;
|
||||
|
||||
/**
|
||||
* Filters.
|
||||
* Filters
|
||||
*/
|
||||
public List<FILTER> filters = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Whether is visible.
|
||||
* Whether is visible
|
||||
*/
|
||||
public boolean isVisible = true;
|
||||
|
||||
/**
|
||||
* Background color.
|
||||
* Background color
|
||||
*/
|
||||
public RGBA backGroundColor;
|
||||
|
||||
/**
|
||||
* Clip actions.
|
||||
* Clip actions
|
||||
*/
|
||||
public CLIPACTIONS clipActions;
|
||||
|
||||
/**
|
||||
* AMF data.
|
||||
* AMF data
|
||||
*/
|
||||
public byte[] amfData;
|
||||
|
||||
/**
|
||||
* Ratio.
|
||||
* Ratio
|
||||
*/
|
||||
public int ratio = -1;
|
||||
|
||||
/**
|
||||
* Whether this is a keyframe.
|
||||
* Whether this is a keyframe
|
||||
*/
|
||||
public boolean key = false;
|
||||
|
||||
/**
|
||||
* Clip depth.
|
||||
* Clip depth
|
||||
*/
|
||||
public int clipDepth = -1;
|
||||
|
||||
/**
|
||||
* How many frames this depthstate is the same.
|
||||
* How many frames this depthstate is the same
|
||||
*/
|
||||
public int time = 0;
|
||||
|
||||
/**
|
||||
* SWF file.
|
||||
* SWF file
|
||||
*/
|
||||
private final SWF swf;
|
||||
|
||||
/**
|
||||
* Frame.
|
||||
* Frame
|
||||
*/
|
||||
public Frame frame;
|
||||
|
||||
/**
|
||||
* Frame of placeobject.
|
||||
* Frame of placeobject
|
||||
*/
|
||||
public Frame placeFrame;
|
||||
|
||||
@@ -149,27 +149,27 @@ public class DepthState {
|
||||
public PlaceObjectTypeTag placeObjectTag;
|
||||
|
||||
/**
|
||||
* Minimum required PlaceObject version.
|
||||
* Minimum required PlaceObject version
|
||||
*/
|
||||
public int minPlaceObjectNum;
|
||||
|
||||
/**
|
||||
* Instance identifier.
|
||||
* Instance identifier
|
||||
*/
|
||||
public long instanceId;
|
||||
|
||||
/**
|
||||
* Whether this is a motion tween.
|
||||
* Whether this is a motion tween
|
||||
*/
|
||||
public boolean motionTween = false;
|
||||
|
||||
/**
|
||||
* Whether this state has an image placed.
|
||||
* Whether this state has an image placed
|
||||
*/
|
||||
public boolean hasImage = false;
|
||||
|
||||
/**
|
||||
* Instance ids counter.
|
||||
* Instance ids counter
|
||||
*/
|
||||
private static AtomicLong lastInstanceId = new AtomicLong(0);
|
||||
|
||||
|
||||
@@ -32,14 +32,14 @@ public interface Timelined extends BoundedTag {
|
||||
/**
|
||||
* Gets SWF which this timelined is part of.
|
||||
*
|
||||
* @return
|
||||
* @return SWF
|
||||
*/
|
||||
public SWF getSwf();
|
||||
|
||||
/**
|
||||
* Gets the timeline object.
|
||||
*
|
||||
* @return
|
||||
* @return Timeline
|
||||
*/
|
||||
public Timeline getTimeline();
|
||||
|
||||
@@ -51,66 +51,66 @@ public interface Timelined extends BoundedTag {
|
||||
/**
|
||||
* Sets modification flag.
|
||||
*
|
||||
* @param value
|
||||
* @param value True if modified
|
||||
*/
|
||||
public void setModified(boolean value);
|
||||
|
||||
/**
|
||||
* Gets tags.
|
||||
*
|
||||
* @return
|
||||
* @return Tags
|
||||
*/
|
||||
public ReadOnlyTagList getTags();
|
||||
|
||||
/**
|
||||
* Removes tag by index.
|
||||
*
|
||||
* @param index
|
||||
* @param index Index
|
||||
*/
|
||||
public void removeTag(int index);
|
||||
|
||||
/**
|
||||
* Removes tag.
|
||||
*
|
||||
* @param tag
|
||||
* @param tag Tag
|
||||
*/
|
||||
public void removeTag(Tag tag);
|
||||
|
||||
/**
|
||||
* Adds tag.
|
||||
*
|
||||
* @param tag
|
||||
* @param tag Tag
|
||||
*/
|
||||
public void addTag(Tag tag);
|
||||
|
||||
/**
|
||||
* Adds tag at the specified index.
|
||||
*
|
||||
* @param index
|
||||
* @param tag
|
||||
* @param index Index
|
||||
* @param tag Tag
|
||||
*/
|
||||
public void addTag(int index, Tag tag);
|
||||
|
||||
/**
|
||||
* Replaces tag at the specified index.
|
||||
*
|
||||
* @param index
|
||||
* @param newTag
|
||||
* @param index Index
|
||||
* @param newTag New tag
|
||||
*/
|
||||
public void replaceTag(int index, Tag newTag);
|
||||
|
||||
/**
|
||||
* Replaces old tag with new tag.
|
||||
*
|
||||
* @param oldTag
|
||||
* @param newTag
|
||||
* @param oldTag Old tag
|
||||
* @param newTag New tag
|
||||
*/
|
||||
public void replaceTag(Tag oldTag, Tag newTag);
|
||||
|
||||
/**
|
||||
* Gets index of tag.
|
||||
*
|
||||
* @param tag
|
||||
* @param tag Tag
|
||||
* @return Index or -1 when not found
|
||||
*/
|
||||
public int indexOfTag(Tag tag);
|
||||
@@ -118,14 +118,14 @@ public interface Timelined extends BoundedTag {
|
||||
/**
|
||||
* Sets frame count.
|
||||
*
|
||||
* @param frameCount
|
||||
* @param frameCount Frame count
|
||||
*/
|
||||
public void setFrameCount(int frameCount);
|
||||
|
||||
/**
|
||||
* Gets frame count.
|
||||
*
|
||||
* @return
|
||||
* @return Frame count
|
||||
*/
|
||||
public int getFrameCount();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user