Reformating to fix checkstyle.

This commit is contained in:
Jindra Petřík
2024-08-07 18:33:17 +02:00
parent a5d3ce4f9b
commit f3da12e032
2432 changed files with 39110 additions and 44808 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -27,6 +27,7 @@ import java.util.TreeMap;
/**
* ActionScript 2 package TreeItem.
*
* @author JPEXS
*/
public class AS2Package implements TreeItem {
@@ -57,7 +58,8 @@ public class AS2Package implements TreeItem {
public Map<String, ASMSource> scripts = new TreeMap<>();
/**
* Whether the package is flat = in the format "mypkg.sub1.sub2" instead of "sub1".
* Whether the package is flat = in the format "mypkg.sub1.sub2" instead of
* "sub1".
*/
private final boolean flat;
@@ -68,11 +70,13 @@ public class AS2Package implements TreeItem {
/**
* 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 flat Whether the package is flat = in the format "mypkg.sub1.sub2"
* instead of "sub1"
* @param defaultPackage
*/
public AS2Package(String name, AS2Package parent, SWF swf, boolean flat, boolean defaultPackage) {
this.name = name;
@@ -84,7 +88,8 @@ public class AS2Package implements TreeItem {
/**
* Checks whether it is default package.
* @return
*
* @return
*/
public boolean isDefaultPackage() {
return defaultPackage;
@@ -92,7 +97,8 @@ public class AS2Package implements TreeItem {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -101,7 +107,8 @@ public class AS2Package implements TreeItem {
/**
* Gets all subpackages and subscripts.
* @return
*
* @return
*/
public List<TreeItem> getAllChildren() {
List<TreeItem> result = new ArrayList<>(getChildCount());
@@ -112,8 +119,9 @@ public class AS2Package implements TreeItem {
/**
* Gets child at index.
*
* @param index
* @return
* @return
*/
public TreeItem getChild(int index) {
if (index < subPackages.size()) {
@@ -141,7 +149,8 @@ public class AS2Package implements TreeItem {
/**
* Gets child count.
* @return
*
* @return
*/
public int getChildCount() {
return subPackages.size() + scripts.size();
@@ -149,8 +158,9 @@ public class AS2Package implements TreeItem {
/**
* Gets index of child.
*
* @param child
* @return
* @return
*/
public int getIndexOfChild(TreeItem child) {
int res = 0;
@@ -175,10 +185,11 @@ public class AS2Package implements TreeItem {
return res;
}
/**
* ToString.
* @return
*/
/**
* ToString.
*
* @return
*/
@Override
public String toString() {
return name;
@@ -186,7 +197,8 @@ public class AS2Package implements TreeItem {
/**
* Gets package name.
* @return
*
* @return
*/
public String getName() {
return name;
@@ -194,7 +206,8 @@ public class AS2Package implements TreeItem {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {
@@ -210,12 +223,12 @@ public class AS2Package implements TreeItem {
}
return false;
}
/**
* Checks whether the package is flat.
* Flat = in the format "mypkg.sub1.sub2" instead of "sub1".
* @return
* Checks whether the package is flat. Flat = in the format
* "mypkg.sub1.sub2" instead of "sub1".
*
* @return
*/
public boolean isFlat() {
return flat;

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -30,6 +30,7 @@ import natorder.NaturalOrderComparator;
/**
* ActionScript 3 package AS3ClassTreeItem
*
* @author JPEXS
*/
public class AS3Package extends AS3ClassTreeItem {
@@ -67,7 +68,8 @@ public class AS3Package extends AS3ClassTreeItem {
private List<ScriptPack> sortedScripts;
/**
* Whether the package is flat = in the format "mypkg.sub1.sub2" instead of "sub1".
* Whether the package is flat = in the format "mypkg.sub1.sub2" instead of
* "sub1".
*/
private final boolean flat;
@@ -97,14 +99,16 @@ public class AS3Package extends AS3ClassTreeItem {
private final boolean partOfCompoundScript;
/**
*
* @param packageName Package name
* @param openable Openable
* @param flat Whether the package is flat = in the format "mypkg.sub1.sub2" instead of "sub1"
* @param flat Whether the package is flat = in the format "mypkg.sub1.sub2"
* instead of "sub1"
* @param defaultPackage Whether this is default package
* @param abc ABC of this package
* @param partOfCompoundScript Whether this package is part of compound script
* @param compoundScriptIndex If this package is compound script package itself, index of scriptInfo
* @param partOfCompoundScript Whether this package is part of compound
* script
* @param compoundScriptIndex If this package is compound script package
* itself, index of scriptInfo
*/
public AS3Package(String packageName, Openable openable, boolean flat, boolean defaultPackage, ABC abc, boolean partOfCompoundScript, Integer compoundScriptIndex) {
super(packageName, "", null);
@@ -116,10 +120,11 @@ public class AS3Package extends AS3ClassTreeItem {
this.abc = abc;
this.partOfCompoundScript = partOfCompoundScript;
}
/**
* Checks whether this package is part of compound script.
* @return
*
* @return
*/
public boolean isPartOfCompoundScript() {
return partOfCompoundScript;
@@ -127,7 +132,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Sets ScriptPack with compound script initializer.
* @param compoundInitializerPack
*
* @param compoundInitializerPack
*/
public void setCompoundInitializerPack(ScriptPack compoundInitializerPack) {
this.compoundInitializerPack = compoundInitializerPack;
@@ -135,7 +141,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets ScriptPack with compound script initializer.
* @return
*
* @return
*/
public ScriptPack getCompoundInitializerPack() {
return compoundInitializerPack;
@@ -143,25 +150,27 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Checks whether it is default package.
* @return
*
* @return
*/
public boolean isDefaultPackage() {
return defaultPackage;
}
/**
* Checks whether the package is flat.
* Flat = in the format "mypkg.sub1.sub2" instead of "sub1".
* @return
* Checks whether the package is flat. Flat = in the format
* "mypkg.sub1.sub2" instead of "sub1".
*
* @return
*/
public boolean isFlat() {
return flat;
}
/**
* Checks whether it is a compound script.
* Not just a part of it.
* @return
* Checks whether it is a compound script. Not just a part of it.
*
* @return
*/
public boolean isCompoundScript() {
return compoundScriptIndex != null;
@@ -169,7 +178,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets index of compound scriptInfo.
* @return
*
* @return
*/
public Integer getCompoundScriptIndex() {
return compoundScriptIndex;
@@ -177,7 +187,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets ABC.
* @return
*
* @return
*/
public ABC getAbc() {
return abc;
@@ -185,7 +196,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets Openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -194,7 +206,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets subpackages.
* @return
*
* @return
*/
public List<AS3Package> getSubPackages() {
if (sortedPackages == null) {
@@ -211,7 +224,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets ScriptPacks in this package.
* @return
*
* @return
*/
public List<ScriptPack> getScriptPacks() {
if (sortedScripts == null) {
@@ -228,7 +242,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Adds ScriptPack to the package.
* @param script
*
* @param script
*/
public void addScriptPack(ScriptPack script) {
ClassPath cp = script.getClassPath();
@@ -238,7 +253,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Adds subpackage.
* @param subPackage
*
* @param subPackage
*/
public void addSubPackage(AS3Package subPackage) {
subPackages.put(subPackage.getNameWithNamespaceSuffix(), subPackage);
@@ -247,8 +263,9 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets subpackage by name.
*
* @param packageName
* @return
* @return
*/
public AS3Package getSubPackage(String packageName) {
return subPackages.get(packageName);
@@ -256,7 +273,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets all subpackages and scripts in this package.
* @return
*
* @return
*/
public List<AS3ClassTreeItem> getAllChildren() {
List<AS3ClassTreeItem> result = new ArrayList<>(getChildCount());
@@ -267,8 +285,9 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets child at index.
*
* @param index
* @return
* @return
*/
public AS3ClassTreeItem getChild(int index) {
if (index < subPackages.size()) {
@@ -284,7 +303,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets child count.
* @return
*
* @return
*/
public int getChildCount() {
return subPackages.size() + getScriptPacks().size();
@@ -292,8 +312,9 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets index of child.
*
* @param child
* @return
* @return
*/
public int getIndexOfChild(AS3ClassTreeItem child) {
int res = 0;
@@ -330,7 +351,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* ToString
* @return
*
* @return
*/
@Override
public String toString() {
@@ -342,7 +364,8 @@ public class AS3Package extends AS3ClassTreeItem {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import java.awt.Shape;
/**
* Clipping region.
*
* @author JPEXS
*/
public class Clip {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -38,6 +38,7 @@ import java.util.concurrent.atomic.AtomicLong;
/**
* State at specific depth on a frame.
*
* @author JPEXS
*/
public class DepthState {
@@ -174,7 +175,8 @@ public class DepthState {
/**
* Gets new instance id.
* @return
*
* @return
*/
public static long getNewInstanceId() {
return lastInstanceId.addAndGet(1);
@@ -182,6 +184,7 @@ public class DepthState {
/**
* Constructs DepthState.
*
* @param swf SWF
* @param frame Frame
* @param placeFrame Frame of placeObject
@@ -195,6 +198,7 @@ public class DepthState {
/**
* Constructs DepthState.
*
* @param obj Last DepthState
* @param frame Frame
* @param placeFrame Frame of placeObject
@@ -231,7 +235,8 @@ public class DepthState {
/**
* Sets matrix.
* @param matrix
*
* @param matrix
*/
public void setMATRIX(MATRIX matrix) {
this.matrix = matrix;
@@ -240,7 +245,8 @@ public class DepthState {
/**
* Checks whether cache as bitmap is on.
* @return
*
* @return
*/
public boolean cacheAsBitmap() {
return (placeObjectTag != null && placeObjectTag.cacheAsBitmap())
@@ -249,8 +255,9 @@ public class DepthState {
/**
* Converts DepthState to PlaceObject tag of required version.
*
* @param depth Depth
* @return
* @return
*/
public PlaceObjectTypeTag toPlaceObjectTag(int depth) {
if (minPlaceObjectNum <= 1) {
@@ -270,7 +277,8 @@ public class DepthState {
/**
* Gets character tag.
* @return
*
* @return
*/
public CharacterTag getCharacter() {
if (characterId == -1) {
@@ -287,7 +295,8 @@ public class DepthState {
/**
* Hashcode.
* @return
*
* @return
*/
@Override
public int hashCode() {
@@ -314,8 +323,9 @@ public class DepthState {
/**
* Equals.
*
* @param obj
* @return
* @return
*/
@Override
public boolean equals(Object obj) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -37,6 +37,7 @@ import java.util.TreeMap;
/**
* Single frame of a timeline.
*
* @author JPEXS
*/
public class Frame implements TreeItem, Exportable {
@@ -87,8 +88,7 @@ public class Frame implements TreeItem, Exportable {
public List<ASMSourceContainer> actionContainers = new ArrayList<>();
/**
* Inner nested tags in this frame.
* See ShowFrameTag.isNestedTagType
* Inner nested tags in this frame. See ShowFrameTag.isNestedTagType
*/
public List<Tag> innerTags = new ArrayList<>();
@@ -98,8 +98,7 @@ public class Frame implements TreeItem, Exportable {
public List<Tag> allInnerTags = new ArrayList<>();
/**
* ShowFrame tag for this frame.
* Can be null for the last frame.
* ShowFrame tag for this frame. Can be null for the last frame.
*/
public ShowFrameTag showFrameTag = null;
@@ -120,6 +119,7 @@ public class Frame implements TreeItem, Exportable {
/**
* Constructs Frame.
*
* @param timeline Timeline
* @param frame Zero-based frame index
*/
@@ -130,6 +130,7 @@ public class Frame implements TreeItem, Exportable {
/**
* Constructs Frame.
*
* @param obj Source frame
* @param frame New zero-based frame index
*/
@@ -146,7 +147,8 @@ public class Frame implements TreeItem, Exportable {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -155,7 +157,8 @@ public class Frame implements TreeItem, Exportable {
/**
* ToString
* @return
*
* @return
*/
@Override
public String toString() {
@@ -174,7 +177,8 @@ public class Frame implements TreeItem, Exportable {
/**
* Gets export file name.
* @return
*
* @return
*/
@Override
public String getExportFileName() {
@@ -183,8 +187,9 @@ public class Frame implements TreeItem, Exportable {
/**
* Equals.
*
* @param obj
* @return
* @return
*/
@Override
public boolean equals(Object obj) {
@@ -198,7 +203,8 @@ public class Frame implements TreeItem, Exportable {
/**
* HashCode.
* @return
*
* @return
*/
@Override
public int hashCode() {
@@ -207,7 +213,8 @@ public class Frame implements TreeItem, Exportable {
/**
* Checks whether some of "all inner frames" are moified.
* @return
*
* @return
*/
public boolean isAllInnerTagsModified() {
for (Tag t : allInnerTags) {
@@ -220,7 +227,8 @@ public class Frame implements TreeItem, Exportable {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {
@@ -247,6 +255,7 @@ public class Frame implements TreeItem, Exportable {
/**
* Get needed characters for this frame.
*
* @param needed Result
*/
public void getNeededCharacters(Set<Integer> needed) {
@@ -263,6 +272,7 @@ public class Frame implements TreeItem, Exportable {
/**
* Get needed characters for this frame to deepest level.
*
* @param needed Result
*/
public void getNeededCharactersDeep(Set<Integer> needed) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.treeitems.TreeItem;
/**
* A frame that contains script
*
* @author JPEXS
*/
public class FrameScript implements TreeItem, Exportable {
@@ -39,6 +40,7 @@ public class FrameScript implements TreeItem, Exportable {
/**
* Constructs FrameScript.
*
* @param swf SWF
* @param frame Frame
*/
@@ -49,7 +51,8 @@ public class FrameScript implements TreeItem, Exportable {
/**
* Gets Frame.
* @return
*
* @return
*/
public Frame getFrame() {
return frame;
@@ -57,7 +60,8 @@ public class FrameScript implements TreeItem, Exportable {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -66,7 +70,8 @@ public class FrameScript implements TreeItem, Exportable {
/**
* ToString.
* @return
*
* @return
*/
@Override
public String toString() {
@@ -75,7 +80,8 @@ public class FrameScript implements TreeItem, Exportable {
/**
* Gets export filename.
* @return
*
* @return
*/
@Override
public String getExportFileName() {
@@ -84,7 +90,8 @@ public class FrameScript implements TreeItem, Exportable {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,6 +23,7 @@ import java.util.Objects;
/**
* Scene object.
*
* @author JPEXS
*/
public class Scene implements TreeItem {
@@ -31,17 +32,17 @@ public class Scene implements TreeItem {
* SWF.
*/
private SWF swf;
/**
* Start frame (zero-ased).
*/
public int startFrame;
/**
* End frame (zero-based).
*/
public int endFrame;
/**
* Name.
*/
@@ -49,6 +50,7 @@ public class Scene implements TreeItem {
/**
* Constructs Scene.
*
* @param swf SWF
* @param startFrame Start frame (zero-based)
* @param endFrame End frame (zero-based)
@@ -63,7 +65,8 @@ public class Scene implements TreeItem {
/**
* Gets number of frames in this scene.
* @return
*
* @return
*/
public int getSceneFrameCount() {
return endFrame - startFrame + 1;
@@ -71,6 +74,7 @@ public class Scene implements TreeItem {
/**
* Gets SceneFrame at index
*
* @param sceneFrameIndex Index at range 0 to sceneFrameCount - 1
* @return
*/
@@ -83,7 +87,8 @@ public class Scene implements TreeItem {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -92,7 +97,8 @@ public class Scene implements TreeItem {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {
@@ -101,7 +107,8 @@ public class Scene implements TreeItem {
/**
* HashCode.
* @return
*
* @return
*/
@Override
public int hashCode() {
@@ -113,8 +120,9 @@ public class Scene implements TreeItem {
/**
* Equals.
*
* @param obj
* @return
* @return
*/
@Override
public boolean equals(Object obj) {
@@ -136,7 +144,8 @@ public class Scene implements TreeItem {
/**
* ToString.
* @return
*
* @return
*/
@Override
public String toString() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,6 +23,7 @@ import java.util.Objects;
/**
* A frame in a Scene object.
*
* @author JPEXS
*/
public class SceneFrame implements TreeItem {
@@ -31,12 +32,12 @@ public class SceneFrame implements TreeItem {
* SWF.
*/
private final SWF swf;
/**
* Scene.
*/
private final Scene scene;
/**
* Real frame index - from main SWF time line.
*/
@@ -44,6 +45,7 @@ public class SceneFrame implements TreeItem {
/**
* Constructs SceneFrame.
*
* @param swf SWF
* @param scene Scene
* @param realFrameIndex Real frame index - from main SWF time line
@@ -56,7 +58,8 @@ public class SceneFrame implements TreeItem {
/**
* Gets scene frame index.
* @return
*
* @return
*/
public int getSceneFrameIndex() {
return realFrameIndex - scene.startFrame;
@@ -64,7 +67,8 @@ public class SceneFrame implements TreeItem {
/**
* Gets frame.
* @return
*
* @return
*/
public Frame getFrame() {
return swf.getTimeline().getFrame(realFrameIndex);
@@ -72,7 +76,8 @@ public class SceneFrame implements TreeItem {
/**
* ToString.
* @return
*
* @return
*/
@Override
public String toString() {
@@ -81,7 +86,8 @@ public class SceneFrame implements TreeItem {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -90,7 +96,8 @@ public class SceneFrame implements TreeItem {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {
@@ -99,7 +106,8 @@ public class SceneFrame implements TreeItem {
/**
* HashCode.
* @return
*
* @return
*/
@Override
public int hashCode() {
@@ -111,8 +119,9 @@ public class SceneFrame implements TreeItem {
/**
* Equals.
*
* @param obj
* @return
* @return
*/
@Override
public boolean equals(Object obj) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -29,6 +29,7 @@ import java.util.List;
/**
* SoundStream blocks across frame range.
*
* @author JPEXS
*/
public class SoundStreamFrameRange implements TreeItem, SoundTag {
@@ -37,12 +38,12 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
* Start frame (zero-based).
*/
public int startFrame;
/**
* End frame (zero-based).
*/
public int endFrame;
/**
* Sound blocks.
*/
@@ -55,6 +56,7 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Constructs SoundStreamFrameRange
*
* @param head Sound stream head
*/
public SoundStreamFrameRange(SoundStreamHeadTypeTag head) {
@@ -63,7 +65,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -72,7 +75,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets modified flag
* @return
*
* @return
*/
@Override
public boolean isModified() {
@@ -81,7 +85,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets sound export format.
* @return
*
* @return
*/
@Override
public SoundExportFormat getExportFormat() {
@@ -90,7 +95,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Checks whether import is supported.
* @return
*
* @return
*/
@Override
public boolean importSupported() {
@@ -99,7 +105,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets sound rate.
* @return
*
* @return
*/
@Override
public int getSoundRate() {
@@ -107,9 +114,9 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
}
/**
* Gets sound type.
* True = stereo, false = mono.
* @return
* Gets sound type. True = stereo, false = mono.
*
* @return
*/
@Override
public boolean getSoundType() {
@@ -118,7 +125,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets raw sound data.
* @return
*
* @return
*/
@Override
public List<ByteArrayRange> getRawSoundData() {
@@ -136,7 +144,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets sound format id.
* @return
*
* @return
*/
@Override
public int getSoundFormatId() {
@@ -145,7 +154,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets total sound sample count.
* @return
*
* @return
*/
@Override
public long getTotalSoundSampleCount() {
@@ -153,9 +163,9 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
}
/**
* Gets sound size.
* True = 16 bit, false = 8 bit.
* @return
* Gets sound size. True = 16 bit, false = 8 bit.
*
* @return
*/
@Override
public boolean getSoundSize() {
@@ -164,7 +174,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets character export filename.
* @return
*
* @return
*/
@Override
public String getCharacterExportFileName() {
@@ -173,7 +184,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets name.
* @return
*
* @return
*/
@Override
public String getName() {
@@ -182,7 +194,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets sound format.
* @return
*
* @return
*/
@Override
public SoundFormat getSoundFormat() {
@@ -190,9 +203,9 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
}
/**
* Sets sound size.
* True = 16 bit, false = 8 bit
* @param soundSize
* Sets sound size. True = 16 bit, false = 8 bit
*
* @param soundSize
*/
@Override
public void setSoundSize(boolean soundSize) {
@@ -200,9 +213,9 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
}
/**
* Sets sound type.
* True = stereo, false = mono
* @param soundType
* Sets sound type. True = stereo, false = mono
*
* @param soundType
*/
@Override
public void setSoundType(boolean soundType) {
@@ -211,7 +224,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Sets sound sample count.
* @param soundSampleCount
*
* @param soundSampleCount
*/
@Override
public void setSoundSampleCount(long soundSampleCount) {
@@ -220,7 +234,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Sets sound compression.
* @param soundCompression
*
* @param soundCompression
*/
@Override
public void setSoundCompression(int soundCompression) {
@@ -229,7 +244,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Sets sound rate.
* @param soundRate
*
* @param soundRate
*/
@Override
public void setSoundRate(int soundRate) {
@@ -238,7 +254,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets character id.
* @return
*
* @return
*/
@Override
public int getCharacterId() {
@@ -247,7 +264,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets sound stream head.
* @return
*
* @return
*/
public SoundStreamHeadTypeTag getHead() {
return head;
@@ -255,7 +273,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* ToString.
* @return
*
* @return
*/
@Override
public String toString() {
@@ -264,7 +283,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Checks whether the sound is readonly.
* @return
*
* @return
*/
@Override
public boolean isReadOnly() {
@@ -273,7 +293,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets FLA export name.
* @return
*
* @return
*/
@Override
public String getFlaExportName() {
@@ -282,7 +303,8 @@ public class SoundStreamFrameRange implements TreeItem, SoundTag {
/**
* Gets initial latency.
* @return
*
* @return
*/
@Override
public int getInitialLatency() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.timeline;
/**
* SVG clipping region
*
* @author JPEXS
*/
public class SvgClip {
@@ -34,6 +35,7 @@ public class SvgClip {
/**
* Constructs SvgClip.
*
* @param shape Shape
* @param depth Depth
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -26,6 +26,7 @@ import java.util.Objects;
/**
* A tag containing script.
*
* @author JPEXS
*/
public class TagScript implements TreeItem, Exportable {
@@ -47,6 +48,7 @@ public class TagScript implements TreeItem, Exportable {
/**
* Constructs TagScript.
*
* @param swf SWF
* @param tag Tag
* @param frames Frames
@@ -59,7 +61,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* Gets tag.
* @return
*
* @return
*/
public Tag getTag() {
return tag;
@@ -67,7 +70,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* Gets frames.
* @return
*
* @return
*/
public List<TreeItem> getFrames() {
return frames;
@@ -75,7 +79,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* Gets openable.
* @return
*
* @return
*/
@Override
public Openable getOpenable() {
@@ -84,7 +89,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* ToString.
* @return
*
* @return
*/
@Override
public String toString() {
@@ -93,7 +99,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* Gets export filename.
* @return
*
* @return
*/
@Override
public String getExportFileName() {
@@ -102,8 +109,9 @@ public class TagScript implements TreeItem, Exportable {
/**
* Equals.
*
* @param obj
* @return
* @return
*/
@Override
public boolean equals(Object obj) {
@@ -116,7 +124,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* HashCode.
* @return
*
* @return
*/
@Override
public int hashCode() {
@@ -125,7 +134,8 @@ public class TagScript implements TreeItem, Exportable {
/**
* Gets modified flag.
* @return
*
* @return
*/
@Override
public boolean isModified() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -90,15 +90,16 @@ import java.util.Stack;
import org.w3c.dom.Element;
/**
* Timeline object created from a Timelined object
* which contains organized list of frames and their contents.
*
* Timeline object created from a Timelined object which contains organized list
* of frames and their contents.
*
* @author JPEXS
*/
public class Timeline {
/**
* Id of timeline. Generally a characterId. Like spriteId or 0 for main SWF timeline.
* Id of timeline. Generally a characterId. Like spriteId or 0 for main SWF
* timeline.
*/
public int id;
@@ -212,7 +213,8 @@ public class Timeline {
/**
* Gets list of frames.
* @return
*
* @return
*/
public synchronized List<Frame> getFrames() {
ensureInitialized();
@@ -221,6 +223,7 @@ public class Timeline {
/**
* Gets frame object.
*
* @param index 0-based frame index
* @return
*/
@@ -234,7 +237,8 @@ public class Timeline {
/**
* Adds a frame.
* @param frame
*
* @param frame
*/
public synchronized void addFrame(Frame frame) {
ensureInitialized();
@@ -245,7 +249,8 @@ public class Timeline {
/**
* Gets AS2 root package.
* @return
*
* @return
*/
public AS2Package getAS2RootPackage() {
ensureInitialized();
@@ -254,7 +259,8 @@ public class Timeline {
/**
* Gets map of depth to max frame.
* @return
*
* @return
*/
public Map<Integer, Integer> getDepthMaxFrame() {
ensureInitialized();
@@ -263,8 +269,9 @@ public class Timeline {
/**
* Gets map of soundStream id to SoundStreamFrameRanges.
*
* @param head
* @return
* @return
*/
public List<SoundStreamFrameRange> getSoundStreamBlocks(SoundStreamHeadTypeTag head) {
ensureInitialized();
@@ -273,7 +280,8 @@ public class Timeline {
/**
* Gets parent tag.
* @return
*
* @return
*/
public Tag getParentTag() {
return timelined instanceof Tag ? (Tag) timelined : null;
@@ -281,7 +289,8 @@ public class Timeline {
/**
* Resets timeline to given SWF file timeline.
* @param swf
*
* @param swf
*/
public void reset(SWF swf) {
reset(swf, swf, 0, swf.displayRect);
@@ -289,6 +298,7 @@ public class Timeline {
/**
* Resets timeline to given Timelined object
*
* @param swf SWF this timelined resides
* @param timelined
* @param id Timeline id - usually characterId or 0 for SWF main timeline
@@ -313,7 +323,8 @@ public class Timeline {
/**
* Gets maximum depth.
* @return
*
* @return
*/
public final int getMaxDepth() {
ensureInitialized();
@@ -322,7 +333,8 @@ public class Timeline {
/**
* Calculates max depth manually.
* @return
*
* @return
*/
private synchronized int getMaxDepthInternal() {
int max_depth = 0;
@@ -341,8 +353,9 @@ public class Timeline {
}
/**
* Gets frame count.
* @return
* Gets frame count.
*
* @return
*/
public synchronized int getFrameCount() {
ensureInitialized();
@@ -350,9 +363,9 @@ public class Timeline {
}
/**
* Gets real frame count.
* Real = when frame has actions or layerschanged.
* @return
* Gets real frame count. Real = when frame has actions or layerschanged.
*
* @return
*/
public synchronized int getRealFrameCount() {
ensureInitialized();
@@ -373,8 +386,9 @@ public class Timeline {
/**
* Gets frame for ASMSource.
*
* @param asm
* @return
* @return
*/
public int getFrameForAction(ASMSource asm) {
Integer frame = actionFrames.get(asm);
@@ -387,7 +401,8 @@ public class Timeline {
/**
* Constructs timeline from SWF.
* @param swf
*
* @param swf
*/
public Timeline(SWF swf) {
this(swf, swf, 0, swf.displayRect);
@@ -395,6 +410,7 @@ public class Timeline {
/**
* Constructs timeline from Timelined object.
*
* @param swf SWF the timelined object resides in
* @param timelined
* @param id Timeline id - usually characterId or 0 for SWF main timeline
@@ -411,6 +427,7 @@ public class Timeline {
/**
* Gets frame with label name.
*
* @param label
* @return frame index (zero based) or -1 when not found
*/
@@ -422,8 +439,8 @@ public class Timeline {
}
/**
* Initialized the timeline.
* It walks all the tags and creates Frame object lists.
* Initialized the timeline. It walks all the tags and creates Frame object
* lists.
*/
private synchronized void initialize() {
int frameIdx = 0;
@@ -755,8 +772,9 @@ public class Timeline {
/**
* Populates sound stream blocks.
*
* @param containerId
* @param tags
* @param tags
*/
private void populateSoundStreamBlocks(int containerId, Iterable<Tag> tags) {
List<SoundStreamFrameRange> ranges = null;
@@ -843,6 +861,7 @@ public class Timeline {
/**
* Gets needed characters for this timeline.
*
* @param usedCharacters Result
*/
public void getNeededCharacters(Set<Integer> usedCharacters) {
@@ -853,6 +872,7 @@ public class Timeline {
/**
* Gets needed characters for this timeline.
*
* @param frames List of frames
* @param usedCharacters Result
*/
@@ -864,8 +884,9 @@ public class Timeline {
/**
* Gets needed characters for a frame.
*
* @param frame
* @param usedCharacters
* @param usedCharacters
*/
public void getNeededCharacters(int frame, Set<Integer> usedCharacters) {
Frame frameObj = getFrame(frame);
@@ -882,9 +903,10 @@ public class Timeline {
/**
* Replaces characterId with another.s
*
* @param oldCharacterId
* @param newCharacterId
* @return
* @return
*/
public boolean replaceCharacter(int oldCharacterId, int newCharacterId) {
boolean modified = false;
@@ -901,9 +923,10 @@ public class Timeline {
/**
* Removes character.
*
* @param characterId
* @param listener Called on tag remove
* @return
* @return
*/
public boolean removeCharacter(int characterId, TagRemoveListener listener) {
return swf.removeCharacterFromTimeline(characterId, this, listener);
@@ -911,8 +934,9 @@ public class Timeline {
/**
* Rounds value to pixels.
*
* @param val
* @return
* @return
*/
public double roundToPixel(double val) {
return Math.rint(val / SWF.unitDivisor) * SWF.unitDivisor;
@@ -920,6 +944,7 @@ public class Timeline {
/**
* Draws drawableTag
*
* @param swf
* @param strokeTransform
* @param layer
@@ -947,7 +972,7 @@ public class Timeline {
* @param fullTransformation
* @param scaleStrokes
* @param drawMode
* @param canUseSmoothing
* @param canUseSmoothing
*/
private void drawDrawable(SWF swf, Matrix strokeTransform, DepthState layer, Matrix layerMatrix, Graphics2D g, ColorTransform colorTransForm, int blendMode, int parentBlendMode, List<Clip> clips, Matrix transformation, boolean isClip, int clipDepth, Matrix absMat, int time, int ratio, RenderContext renderContext, SerializableImage image, SerializableImage fullImage, DrawableTag drawable, List<FILTER> filters, double unzoom, ColorTransform clrTrans, boolean sameImage, ExportRectangle viewRect, Matrix fullTransformation, boolean scaleStrokes, int drawMode, boolean canUseSmoothing) {
Matrix drawMatrix = new Matrix();
@@ -974,7 +999,7 @@ public class Timeline {
viewRectZoom.xMin = 0;
viewRectZoom.yMax -= viewRectZoom.yMin;
viewRectZoom.yMin = 0;
if (!viewRectZoom.intersects(fullRect)) {
if (clipDepth > -1) {
Clip clip = new Clip(new Area(), clipDepth);
@@ -1090,7 +1115,7 @@ public class Timeline {
if (canUseSameImage && sameImage) {
img = image;
m = mat.clone();
g.setTransform(new AffineTransform());
g.setTransform(new AffineTransform());
} else {
img = new SerializableImage(newWidth, newHeight, SerializableImage.TYPE_INT_ARGB_PRE);
img.fillTransparent();
@@ -1251,6 +1276,7 @@ public class Timeline {
/**
* Converts specified frame to an image.
*
* @param frame
* @param time
* @param renderContext
@@ -1268,7 +1294,7 @@ public class Timeline {
* @param scaleStrokes
* @param drawMode
* @param blendMode
* @param canUseSmoothing
* @param canUseSmoothing
*/
public void toImage(int frame, int time, RenderContext renderContext, SerializableImage image, SerializableImage fullImage, boolean isClip, Matrix transformation, Matrix strokeTransformation, Matrix absoluteTransformation, ColorTransform colorTransform, double unzoom, boolean sameImage, ExportRectangle viewRect, Matrix fullTransformation, boolean scaleStrokes, int drawMode, int blendMode, boolean canUseSmoothing) {
if (getFrameCount() <= frame) {
@@ -1279,7 +1305,7 @@ public class Timeline {
Graphics2D g = (Graphics2D) image.getGraphics();
Graphics2D fullG = (Graphics2D) fullImage.getGraphics();
Shape prevClip = g.getClip();
if (!sameImage) {
g.setPaint(frameObj.backgroundColor.toColor());
g.fill(new Rectangle(image.getWidth(), image.getHeight()));
@@ -1316,7 +1342,7 @@ public class Timeline {
}
g.setTransform(new AffineTransform());
g.setClip(clip);
g.setClip(clip);
} else {
g.setClip(prevClip);
}
@@ -1443,6 +1469,7 @@ public class Timeline {
/**
* Converts specified frame to SVG.
*
* @param frame
* @param time
* @param stateUnderCursor
@@ -1450,7 +1477,7 @@ public class Timeline {
* @param exporter
* @param colorTransform
* @param level
* @throws IOException
* @throws IOException
*/
public void toSVG(int frame, int time, DepthState stateUnderCursor, int mouseButton, SVGExporter exporter, ColorTransform colorTransform, int level) throws IOException {
if (getFrameCount() <= frame) {
@@ -1552,9 +1579,10 @@ public class Timeline {
/**
* Gets tag type prefix for SVG export.
*
* @param tag
* @param exporter
* @return
* @return
*/
private static String getTagIdPrefix(Tag tag, SVGExporter exporter) {
if (tag instanceof ShapeTag) {
@@ -1577,9 +1605,10 @@ public class Timeline {
/**
* Converts list of frames to HTML Canvas.
*
* @param result
* @param unitDivisor
* @param frames
* @param frames
*/
public void toHtmlCanvas(StringBuilder result, double unitDivisor, List<Integer> frames) {
FrameExporter.framesToHtmlCanvas(result, unitDivisor, this, frames, 0, null, 0, displayRect, null, null);
@@ -1587,13 +1616,14 @@ public class Timeline {
/**
* Gets all sounds from the frame.
*
* @param frame
* @param time
* @param mouseOverButton
* @param mouseButton
* @param sounds
* @param soundClasses
* @param soundInfos
* @param soundInfos
*/
public void getSounds(int frame, int time, ButtonTag mouseOverButton, int mouseButton, List<Integer> sounds, List<String> soundClasses, List<SOUNDINFO> soundInfos) {
Frame fr = getFrame(frame);
@@ -1628,6 +1658,7 @@ public class Timeline {
/**
* Gets outline of the frame.
*
* @param fast
* @param frame
* @param time
@@ -1636,7 +1667,7 @@ public class Timeline {
* @param stroked
* @param viewRect
* @param unzoom
* @return
* @return
*/
public Shape getOutline(boolean fast, int frame, int time, RenderContext renderContext, Matrix transformation, boolean stroked, ExportRectangle viewRect, double unzoom) {
Frame fr = getFrame(frame);
@@ -1709,9 +1740,10 @@ public class Timeline {
}
/**
* Checks whether all frames are singleframe.
* Single frame = each frame has no animated parts inside.
* @return
* Checks whether all frames are singleframe. Single frame = each frame has
* no animated parts inside.
*
* @return
*/
public boolean isSingleFrame() {
for (int i = 0; i < getFrameCount(); i++) {
@@ -1723,10 +1755,11 @@ public class Timeline {
}
/**
* Checks whether specified frame is single frame.
* Single frame = has no animated parts inside.
* Checks whether specified frame is single frame. Single frame = has no
* animated parts inside.
*
* @param frame
* @return
* @return
*/
public boolean isSingleFrame(int frame) {
Frame frameObj = getFrame(frame);
@@ -1755,8 +1788,9 @@ public class Timeline {
/**
* Equals test.
*
* @param obj
* @return
* @return
*/
@Override
public boolean equals(Object obj) {
@@ -1770,7 +1804,8 @@ public class Timeline {
/**
* Gets scenes list.
* @return
*
* @return
*/
public List<Scene> getScenes() {
ensureInitialized();

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -22,22 +22,24 @@ import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
/**
* Represents an object which can be created timeline from.
* It has list of tags which can be listed and/or modified.
*
* Represents an object which can be created timeline from. It has list of tags
* which can be listed and/or modified.
*
* @author JPEXS
*/
public interface Timelined extends BoundedTag {
/**
* Gets SWF which this timelined is part of.
* @return
*
* @return
*/
public SWF getSwf();
/**
* Gets the timeline object.
* @return
*
* @return
*/
public Timeline getTimeline();
@@ -48,57 +50,66 @@ public interface Timelined extends BoundedTag {
/**
* Sets modification flag.
* @param value
*
* @param value
*/
public void setModified(boolean value);
/**
* Gets tags.
* @return
*
* @return
*/
public ReadOnlyTagList getTags();
/**
* Removes tag by index.
* @param index
*
* @param index
*/
public void removeTag(int index);
/**
* Removes tag.
* @param tag
*
* @param tag
*/
public void removeTag(Tag tag);
/**
* Adds tag.
* @param tag
*
* @param tag
*/
public void addTag(Tag tag);
/**
* Adds tag at the specified index.
*
* @param index
* @param tag
* @param tag
*/
public void addTag(int index, Tag tag);
/**
* Replaces tag at the specified index.
*
* @param index
* @param newTag
* @param newTag
*/
public void replaceTag(int index, Tag newTag);
/**
* Replaces old tag with new tag.
*
* @param oldTag
* @param newTag
* @param newTag
*/
public void replaceTag(Tag oldTag, Tag newTag);
/**
* Gets index of tag.
*
* @param tag
* @return Index or -1 when not found
*/
@@ -106,13 +117,15 @@ public interface Timelined extends BoundedTag {
/**
* Sets frame count.
* @param frameCount
*
* @param frameCount
*/
public void setFrameCount(int frameCount);
/**
* Gets frame count.
* @return
*
* @return
*/
public int getFrameCount();
}

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -21,8 +21,7 @@ import java.util.Arrays;
import java.util.List;
/**
* An attemp to detect tweens.
* FIXME!! NOT WORKING STUB!!!
* An attemp to detect tweens. FIXME!! NOT WORKING STUB!!!
*
* @author JPEXS
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library 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
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.timeline;
/**
* Range of tween.
*
* @author JPEXS
*/
public class TweenRange {

View File

@@ -1,4 +1,4 @@
/**
* Flash timeline.
*/
package com.jpexs.decompiler.flash.timeline;
package com.jpexs.decompiler.flash.timeline;