From d675f65dfdae0d7f18f39095ca67ad783d089dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Tue, 18 Feb 2014 19:14:49 +0100 Subject: [PATCH] Generic tag editor improved --- .../decompiler/flash/gui/GenericTagPanel.java | 82 +++++++++++++++---- .../jpexs/decompiler/flash/gui/MainPanel.java | 12 +-- .../gui/generictageditors/StringEditor.java | 17 +++- .../decompiler/flash/tags/MetadataTag.java | 2 + .../com/jpexs/decompiler/flash/tags/Tag.java | 7 +- .../flash/types/ALPHABITMAPDATA.java | 4 +- .../flash/types/ALPHACOLORMAPDATA.java | 4 +- .../jpexs/decompiler/flash/types/ARGB.java | 3 +- .../decompiler/flash/types/BITMAPDATA.java | 4 +- .../flash/types/BUTTONCONDACTION.java | 3 +- .../decompiler/flash/types/BUTTONRECORD.java | 3 +- .../flash/types/CLIPACTIONRECORD.java | 3 +- .../decompiler/flash/types/CLIPACTIONS.java | 3 +- .../flash/types/CLIPEVENTFLAGS.java | 3 +- .../decompiler/flash/types/COLORMAPDATA.java | 4 +- .../jpexs/decompiler/flash/types/CXFORM.java | 3 +- .../flash/types/CXFORMWITHALPHA.java | 3 +- .../decompiler/flash/types/FILLSTYLE.java | 3 +- .../flash/types/FILLSTYLEARRAY.java | 3 +- .../decompiler/flash/types/FOCALGRADIENT.java | 3 +- .../decompiler/flash/types/GLYPHENTRY.java | 3 +- .../decompiler/flash/types/GRADIENT.java | 3 +- .../decompiler/flash/types/GRADRECORD.java | 3 +- .../decompiler/flash/types/KERNINGRECORD.java | 3 +- .../decompiler/flash/types/LANGCODE.java | 3 +- .../decompiler/flash/types/LINESTYLE.java | 3 +- .../decompiler/flash/types/LINESTYLE2.java | 3 +- .../flash/types/LINESTYLEARRAY.java | 4 +- .../flash/types/MORPHFILLSTYLE.java | 3 +- .../flash/types/MORPHFILLSTYLEARRAY.java | 3 +- .../decompiler/flash/types/MORPHGRADIENT.java | 3 +- .../flash/types/MORPHGRADRECORD.java | 3 +- .../flash/types/MORPHLINESTYLE.java | 3 +- .../flash/types/MORPHLINESTYLE2.java | 3 +- .../flash/types/MORPHLINESTYLEARRAY.java | 4 +- .../jpexs/decompiler/flash/types/PIX15.java | 3 +- .../jpexs/decompiler/flash/types/PIX24.java | 3 +- .../com/jpexs/decompiler/flash/types/RGB.java | 3 +- .../jpexs/decompiler/flash/types/RGBA.java | 3 +- .../jpexs/decompiler/flash/types/SHAPE.java | 3 +- .../flash/types/SHAPEWITHSTYLE.java | 3 +- .../decompiler/flash/types/SOUNDENVELOPE.java | 3 +- .../decompiler/flash/types/SOUNDINFO.java | 3 +- .../decompiler/flash/types/TEXTRECORD.java | 3 +- .../decompiler/flash/types/ZONEDATA.java | 3 +- .../decompiler/flash/types/ZONERECORD.java | 4 +- .../flash/types/annotations/Multiline.java | 27 ++++++ .../flash/types/filters/FILTER.java | 3 +- .../flash/types/gfx/ContourType.java | 3 +- .../decompiler/flash/types/gfx/EdgeType.java | 3 +- .../decompiler/flash/types/gfx/FONTINFO.java | 3 +- .../decompiler/flash/types/gfx/FontType.java | 3 +- .../decompiler/flash/types/gfx/GLYPHIDX.java | 3 +- .../flash/types/gfx/GlyphInfoType.java | 3 +- .../decompiler/flash/types/gfx/GlyphType.java | 3 +- .../flash/types/gfx/KerningPairType.java | 3 +- .../decompiler/flash/types/gfx/TEXGLYPH.java | 3 +- 57 files changed, 227 insertions(+), 80 deletions(-) create mode 100644 trunk/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java index 45b600634..c0ccef2e5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.gui; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.gui.generictageditors.BooleanEditor; import com.jpexs.decompiler.flash.gui.generictageditors.ChangeListener; import com.jpexs.decompiler.flash.gui.generictageditors.ColorEditor; @@ -31,10 +32,12 @@ import com.jpexs.decompiler.flash.types.RGBA; import com.jpexs.decompiler.flash.types.annotations.Calculated; import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.Internal; +import com.jpexs.decompiler.flash.types.annotations.Multiline; import com.jpexs.decompiler.flash.types.annotations.Optional; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.decompiler.flash.types.annotations.parser.ConditionEvaluator; import com.jpexs.decompiler.flash.types.annotations.parser.ParseException; +import com.jpexs.helpers.Helper; import java.awt.BorderLayout; import java.awt.Component; import java.awt.FlowLayout; @@ -76,6 +79,8 @@ public class GenericTagPanel extends JPanel implements ChangeListener { private final JScrollPane genericTagPropertiesEditorPaneScrollPanel; private final JScrollPane genericTagPropertiesEditPanelScrollPanel; private Tag tag; + private Tag editedTag; + private List keys = new ArrayList<>(); private Map editors = new HashMap<>(); private Map labels = new HashMap<>(); @@ -104,11 +109,12 @@ public class GenericTagPanel extends JPanel implements ChangeListener { genericTagPropertiesEditPanel = new JPanel(); genericTagPropertiesEditPanel.setLayout(new SpringLayout()); - genericTagPropertiesEditPanelScrollPanel = new JScrollPane(genericTagPropertiesEditPanel); + JPanel edPanel=new JPanel(new BorderLayout()); + edPanel.add(genericTagPropertiesEditPanel,BorderLayout.NORTH); + genericTagPropertiesEditPanelScrollPanel = new JScrollPane(edPanel); } public void clear() { - tag = null; editors.clear(); fieldPaths.clear(); fieldIndices.clear(); @@ -122,8 +128,16 @@ public class GenericTagPanel extends JPanel implements ChangeListener { genericTagPropertiesEditPanel.setSize(0, 0); } - public void setEditMode(boolean edit) { - if (edit) { + public void setEditMode(boolean edit, Tag tag) { + if(tag==null){ + tag = this.tag; + } + + this.tag = tag; + this.editedTag = (Tag)Helper.deepCopy(tag); + generateEditControls(editedTag, !edit); + + if (edit){ remove(genericTagPropertiesEditorPaneScrollPanel); add(genericTagPropertiesEditPanelScrollPanel, BorderLayout.CENTER); } else { @@ -131,11 +145,13 @@ public class GenericTagPanel extends JPanel implements ChangeListener { genericTagPropertiesEditPanel.setSize(0, 0); remove(genericTagPropertiesEditPanelScrollPanel); add(genericTagPropertiesEditorPaneScrollPanel, BorderLayout.CENTER); + setTagText(this.tag); } + revalidate(); repaint(); } - public void setTagText(Tag tag) { + private void setTagText(Tag tag) { clear(); generateEditControls(tag, true); String val = ""; @@ -153,9 +169,8 @@ public class GenericTagPanel extends JPanel implements ChangeListener { hdr.setText(tag.toString()); } - public void generateEditControls(Tag tag, boolean readonly) { + private void generateEditControls(Tag tag, boolean readonly) { clear(); - this.tag = tag; generateEditControlsRecursive(tag, "", new ArrayList(), new ArrayList(), readonly); change(null); } @@ -166,6 +181,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener { propCount, 3, //rows, cols 6, 6, //initX, initY 6, 6); //xPad, yPad + revalidate(); repaint(); } @@ -223,7 +239,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener { } else { propCount += addEditor(name, obj, field, 0, field.getType(), value, parentFields, parentIndices, readonly); } - if (ReflectionTools.needsIndex(field) && !readonly) { + if (ReflectionTools.needsIndex(field) && !readonly && !field.getName().equals("clipActionRecords")) { //No clip actions, sorry JButton addButton = new JButton(View.getIcon("add16")); addButton.addActionListener(new ActionListener() { @Override @@ -280,7 +296,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener { } - generateEditControls(tag, false); + generateEditControls(editedTag, false); //Restore scroll top after some time. TODO: Handle this better. I don't know how :-(. new Thread() { @@ -300,7 +316,9 @@ public class GenericTagPanel extends JPanel implements ChangeListener { }); } - }.start(); + }.start(); + revalidate(); + repaint(); } private void addItem(Object obj, Field field) { @@ -329,7 +347,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener { } else { ReflectionTools.enlargeField(obj, field, true); } - generateEditControls(tag, false); + generateEditControls(editedTag, false); //Restore scroll top after some time. TODO: Handle this better. I don't know how :-(. new Thread() { @@ -350,6 +368,8 @@ public class GenericTagPanel extends JPanel implements ChangeListener { } }.start(); + revalidate(); + repaint(); } private int addEditor(String name, Object obj, Field field, int index, Class type, Object value, List parentList, List parentIndices, boolean readonly) throws IllegalArgumentException, IllegalAccessException { @@ -367,6 +387,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener { return 0; } SWFType swfType = field.getAnnotation(SWFType.class); + Multiline multiline = field.getAnnotation(Multiline.class); Component editor; if (type.equals(int.class) || type.equals(Integer.class) || type.equals(short.class) || type.equals(Short.class) @@ -377,7 +398,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener { } else if (type.equals(boolean.class) || type.equals(Boolean.class)) { editor = new BooleanEditor(name, obj, field, index, type); } else if (type.equals(String.class)) { - editor = new StringEditor(name, obj, field, index, type); + editor = new StringEditor(name, obj, field, index, type,multiline!=null); } else if (type.equals(RGB.class) || type.equals(RGBA.class) || type.equals(ARGB.class)) { editor = new ColorEditor(name, obj, field, index, type); } else { @@ -445,6 +466,28 @@ public class GenericTagPanel extends JPanel implements ChangeListener { } return result; } + + private void assignTag(Tag t,Tag assigned){ + if(t.getClass()!=assigned.getClass()){ + return; + } + for(Field f:t.getClass().getDeclaredFields()){ + if((f.getModifiers()&Modifier.FINAL) == Modifier.FINAL){ + continue; + } + if((f.getModifiers()&Modifier.STATIC) == Modifier.STATIC){ + continue; + } + if(f.getName().equals("ID")){ + continue; + } + try { + f.set(t, f.get(assigned)); + } catch (IllegalArgumentException | IllegalAccessException ex) { + Logger.getLogger(GenericTagPanel.class.getName()).log(Level.SEVERE, null, ex); + } + } + } public void save() { for (Object component : genericTagPropertiesEditPanel.getComponents()) { @@ -452,7 +495,10 @@ public class GenericTagPanel extends JPanel implements ChangeListener { ((GenericTagEditor) component).save(); } } + SWF swf=tag.getSwf(); + assignTag(tag, editedTag); tag.setModified(true); + tag.setSwf(swf); setTagText(tag); } @@ -528,9 +574,9 @@ public class GenericTagPanel extends JPanel implements ChangeListener { if (addKeys.contains(key)) { dependentEditor = addButtons.get(key); } else if (removeButtons.containsKey(key)) { //It's array/list, add remove button - JPanel editRemPanel = new JPanel(new FlowLayout()); - editRemPanel.add((Component) editors.get(key)); - editRemPanel.add(removeButtons.get(key)); + JPanel editRemPanel = new JPanel(new BorderLayout()); + editRemPanel.add((Component) editors.get(key),BorderLayout.CENTER); + editRemPanel.add(removeButtons.get(key),BorderLayout.EAST); dependentEditor = editRemPanel; } else { dependentEditor = (Component) editors.get(key); @@ -544,9 +590,9 @@ public class GenericTagPanel extends JPanel implements ChangeListener { propCount++; } } + /*genericTagPropertiesEditPanel.add(new JPanel()); genericTagPropertiesEditPanel.add(new JPanel()); - genericTagPropertiesEditPanel.add(new JPanel()); - genericTagPropertiesEditPanel.add(new JPanel()); - relayout(propCount + 1); + genericTagPropertiesEditPanel.add(new JPanel());*/ + relayout(propCount /*+ 1*/); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 8dd6f586e..c037c62d0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -2158,8 +2158,8 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec genericEditButton.setVisible(false); genericSaveButton.setVisible(true); genericCancelButton.setVisible(true); - genericTagPanel.generateEditControls((Tag) item, false); - genericTagPanel.setEditMode(true); + //genericTagPanel.generateEditControls((Tag) item, false); + genericTagPanel.setEditMode(true,(Tag) item); } } @@ -2173,14 +2173,14 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec genericEditButton.setVisible(true); genericSaveButton.setVisible(false); genericCancelButton.setVisible(false); - genericTagPanel.setEditMode(false); + genericTagPanel.setEditMode(false,null); } break; case ACTION_CANCEL_GENERIC_TAG: { genericEditButton.setVisible(true); genericSaveButton.setVisible(false); genericCancelButton.setVisible(false); - genericTagPanel.setEditMode(false); + genericTagPanel.setEditMode(false,null); } break; case ACTION_REMOVE_ITEM: @@ -2479,11 +2479,11 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } else if (tagObj instanceof Tag) { showCard(CARDGENEICTAGPANEL); - genericTagPanel.setTagText((Tag) tagObj); + //genericTagPanel.setTagText((Tag) tagObj); genericEditButton.setVisible(true); genericSaveButton.setVisible(false); genericCancelButton.setVisible(false); - genericTagPanel.setEditMode(false); + genericTagPanel.setEditMode(false,(Tag)tagObj); } else { showCard(CARDEMPTYPANEL); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java index cf734886c..6e7793e96 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.gui.generictageditors; import com.jpexs.helpers.Helper; +import java.awt.Dimension; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.lang.reflect.Field; @@ -34,14 +35,26 @@ public class StringEditor extends JTextArea implements GenericTagEditor { private final int index; private final Class type; private String fieldName; + private boolean multiline; - public StringEditor(String fieldName,Object obj, Field field, int index, Class type) { - setLineWrap(true); + @Override + public boolean getScrollableTracksViewportWidth() { + return true; + } + + public StringEditor(String fieldName,Object obj, Field field, int index, Class type, boolean multiline) { + setLineWrap(true); this.obj = obj; this.field = field; this.index = index; this.type = type; this.fieldName = fieldName; + this.multiline = multiline; + if(multiline){ + Dimension d = new Dimension(500,200); + setPreferredSize(d); + setSize(d); + } try { setText((String) ReflectionTools.getValue(obj, field, index)); } catch (IllegalArgumentException | IllegalAccessException ex) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java index 0a9cda653..ce1992dbd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java @@ -19,6 +19,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.types.annotations.Multiline; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -26,6 +27,7 @@ import java.io.OutputStream; public class MetadataTag extends Tag { + @Multiline public String xmlMetadata; public static final int ID = 77; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java index 0ed147bb1..a480f783f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -31,6 +31,7 @@ import com.jpexs.decompiler.flash.tags.gfx.DefineGradientMap; import com.jpexs.decompiler.flash.tags.gfx.DefineSubImage; import com.jpexs.decompiler.flash.tags.gfx.ExporterInfoTag; import com.jpexs.decompiler.flash.tags.gfx.FontTextureInfo; +import java.io.Serializable; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -40,7 +41,7 @@ import java.util.Set; /** * Represents Tag inside SWF file */ -public class Tag implements NeedsCharacters, Exportable, ContainerItem { +public class Tag implements NeedsCharacters, Exportable, ContainerItem, Serializable { /** * Identifier of tag type @@ -57,8 +58,8 @@ public class Tag implements NeedsCharacters, Exportable, ContainerItem { public boolean forceWriteAsLong = false; private final long pos; protected String name; - public Tag previousTag; - protected SWF swf; + public Tag previousTag; + protected transient SWF swf; private boolean modified; public String getName() { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java index 5aed6fec3..c6c1c3aff 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java @@ -16,12 +16,14 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * Represents 32-bit alpha, red, green and blue value * * @author JPEXS */ -public class ALPHABITMAPDATA { +public class ALPHABITMAPDATA implements Serializable { public ARGB[] bitmapPixelData = new ARGB[0]; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java index 5eef0697c..da2a7aab2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java @@ -16,12 +16,14 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * Represents 32-bit alpha, red, green and blue value * * @author JPEXS */ -public class ALPHACOLORMAPDATA { +public class ALPHACOLORMAPDATA implements Serializable { public RGBA[] colorTableRGB; public byte[] colorMapPixelData; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ARGB.java b/trunk/src/com/jpexs/decompiler/flash/types/ARGB.java index 024ec5879..73af496ed 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ARGB.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ARGB.java @@ -18,13 +18,14 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.awt.Color; +import java.io.Serializable; /** * Represents 32-bit alpha, red, green and blue value * * @author JPEXS */ -public class ARGB { +public class ARGB implements Serializable { /** * Alpha value defining opacity diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java index a3d8e9e7e..76dc72409 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java @@ -16,12 +16,14 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * Represents 32-bit alpha, red, green and blue value * * @author JPEXS */ -public class BITMAPDATA { +public class BITMAPDATA implements Serializable { public PIX15[] bitmapPixelDataPix15 = new PIX15[0]; public PIX24[] bitmapPixelDataPix24 = new PIX24[0]; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java index 63dd85a3c..b0ef5279c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java @@ -33,6 +33,7 @@ import com.jpexs.helpers.Helper; import com.jpexs.helpers.MemoryInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; @@ -43,7 +44,7 @@ import java.util.logging.Logger; * * @author JPEXS */ -public class BUTTONCONDACTION implements ASMSource, Exportable, ContainerItem { +public class BUTTONCONDACTION implements ASMSource, Exportable, ContainerItem, Serializable { private final SWF swf; private final long pos; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java index a5558e5af..61b8761fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.decompiler.flash.types.filters.FILTER; +import java.io.Serializable; import java.util.List; /** @@ -28,7 +29,7 @@ import java.util.List; * * @author JPEXS */ -public class BUTTONRECORD { +public class BUTTONRECORD implements Serializable { @Reserved @SWFType(value = BasicType.UB, count = 2) diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java index 6f3c21b0c..f4ee2021a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java @@ -32,6 +32,7 @@ import com.jpexs.helpers.Helper; import com.jpexs.helpers.MemoryInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; @@ -42,7 +43,7 @@ import java.util.logging.Logger; * * @author JPEXS */ -public class CLIPACTIONRECORD implements ASMSource, Exportable, ContainerItem { +public class CLIPACTIONRECORD implements ASMSource, Exportable, ContainerItem, Serializable { public static String keyToString(int key) { if ((key < CLIPACTIONRECORD.KEYNAMES.length) && (key > 0) && (CLIPACTIONRECORD.KEYNAMES[key] != null)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java index 109b7c337..fb1bcdf4d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -26,7 +27,7 @@ import java.util.List; * * @author JPEXS */ -public class CLIPACTIONS { +public class CLIPACTIONS implements Serializable { @Reserved @SWFType(BasicType.UI16) diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java index 8189a5456..9e73be994 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.helpers.Helper; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -28,7 +29,7 @@ import java.util.List; * * @author JPEXS */ -public class CLIPEVENTFLAGS { +public class CLIPEVENTFLAGS implements Serializable { /** * Key up event diff --git a/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java index 57a5c7838..cb70f4b13 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java @@ -16,10 +16,12 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * @author JPEXS */ -public class COLORMAPDATA { +public class COLORMAPDATA implements Serializable { public RGB[] colorTableRGB; public byte[] colorMapPixelData; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CXFORM.java b/trunk/src/com/jpexs/decompiler/flash/types/CXFORM.java index 9ebab78c8..4f920d469 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CXFORM.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CXFORM.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.types.annotations.Calculated; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.decompiler.flash.types.filters.Filtering; import com.jpexs.helpers.SerializableImage; +import java.io.Serializable; /** * Defines a transform that can be applied to the color space of a graphic @@ -27,7 +28,7 @@ import com.jpexs.helpers.SerializableImage; * * @author JPEXS */ -public class CXFORM { +public class CXFORM implements Serializable { /** * Has color addition values diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java b/trunk/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java index 2fb82459b..27fbe1d8a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.decompiler.flash.types.filters.Filtering; import com.jpexs.helpers.SerializableImage; +import java.io.Serializable; /** * Defines a transform that can be applied to the color space of a graphic @@ -28,7 +29,7 @@ import com.jpexs.helpers.SerializableImage; * * @author JPEXS */ -public class CXFORMWITHALPHA { +public class CXFORMWITHALPHA implements Serializable { /** * Has color addition values diff --git a/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java index 2ac15e2e6..c9f40fa93 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.ConditionalType; import com.jpexs.decompiler.flash.types.annotations.Internal; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -29,7 +30,7 @@ import java.util.Set; * * @author JPEXS */ -public class FILLSTYLE implements NeedsCharacters { +public class FILLSTYLE implements NeedsCharacters, Serializable { @SWFType(BasicType.UI8) public int fillStyleType; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java index 6b44460b7..c8733bdd8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; +import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -24,7 +25,7 @@ import java.util.Set; * * @author JPEXS */ -public class FILLSTYLEARRAY implements NeedsCharacters { +public class FILLSTYLEARRAY implements NeedsCharacters, Serializable { public FILLSTYLE[] fillStyles; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java index a59d92427..8f7767591 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class FOCALGRADIENT extends GRADIENT { +public class FOCALGRADIENT extends GRADIENT implements Serializable { @SWFType(BasicType.FIXED8) public float focalPoint; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java b/trunk/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java index e80f4849f..7c79fc0ec 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class GLYPHENTRY { +public class GLYPHENTRY implements Serializable { @SWFType(value = BasicType.UB, countField = "+glyphBits") public int glyphIndex; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java index e59d0cee3..6f8e5183c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class GRADIENT { +public class GRADIENT implements Serializable { /** * Spread mode diff --git a/trunk/src/com/jpexs/decompiler/flash/types/GRADRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/GRADRECORD.java index efc179ffd..74e1fe9f3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/GRADRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/GRADRECORD.java @@ -18,12 +18,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Internal; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class GRADRECORD { +public class GRADRECORD implements Serializable { @SWFType(BasicType.UI8) public int ratio; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java index a633e2dc8..c6cdc31dc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.awt.Font; import java.awt.font.GlyphVector; import java.awt.font.TextAttribute; +import java.io.Serializable; import java.text.AttributedCharacterIterator; import java.util.HashMap; import java.util.Map; @@ -30,7 +31,7 @@ import javax.swing.JPanel; * * @author JPEXS */ -public class KERNINGRECORD { +public class KERNINGRECORD implements Serializable { @SWFType(value = BasicType.UI8, alternateValue = BasicType.UI16, alternateCondition = "fontFlagsWideCodes") public int fontKerningCode1; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/LANGCODE.java b/trunk/src/com/jpexs/decompiler/flash/types/LANGCODE.java index a142c4e82..04815a2d9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/LANGCODE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/LANGCODE.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class LANGCODE { +public class LANGCODE implements Serializable { @SWFType(BasicType.UI8) public int languageCode; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE.java index d166dd090..ec5a8cf38 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE.java @@ -20,12 +20,13 @@ import com.jpexs.decompiler.flash.tags.DefineShape3Tag; import com.jpexs.decompiler.flash.tags.DefineShape4Tag; import com.jpexs.decompiler.flash.types.annotations.ConditionalType; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class LINESTYLE { +public class LINESTYLE implements Serializable { @SWFType(BasicType.UI16) public int width; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java index c134dd9d1..9c461154c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java @@ -19,12 +19,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class LINESTYLE2 extends LINESTYLE { +public class LINESTYLE2 extends LINESTYLE implements Serializable { @SWFType(value = BasicType.UB, count = 2) public int startCapStyle; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java index a144f57fa..5c7da5a50 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java @@ -16,11 +16,13 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * * @author JPEXS */ -public class LINESTYLEARRAY { +public class LINESTYLEARRAY implements Serializable { public LINESTYLE[] lineStyles = new LINESTYLE[0]; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java index 036aab96e..3440b57a4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -26,7 +27,7 @@ import java.util.Set; * * @author JPEXS */ -public class MORPHFILLSTYLE implements NeedsCharacters { +public class MORPHFILLSTYLE implements NeedsCharacters,Serializable { @SWFType(BasicType.UI8) public int fillStyleType; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java index 7d9359956..ecba1d03e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; +import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -24,7 +25,7 @@ import java.util.Set; * * @author JPEXS */ -public class MORPHFILLSTYLEARRAY implements NeedsCharacters { +public class MORPHFILLSTYLEARRAY implements NeedsCharacters,Serializable { public MORPHFILLSTYLE[] fillStyles; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java index 4bda2e6f9..b22e7aa36 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java @@ -18,12 +18,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Internal; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class MORPHGRADIENT { +public class MORPHGRADIENT implements Serializable { /** * Spread mode. See GRADIENT.SPREAD_* constants diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java index 254d1901e..148b46f39 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class MORPHGRADRECORD { +public class MORPHGRADRECORD implements Serializable { @SWFType(BasicType.UI8) public int startRatio; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java index 15b6a2d55..2fe84cace 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class MORPHLINESTYLE { +public class MORPHLINESTYLE implements Serializable { @SWFType(BasicType.UI16) public int startWidth; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java index 51ec4c668..25614e99c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java @@ -19,12 +19,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class MORPHLINESTYLE2 { +public class MORPHLINESTYLE2 implements Serializable { @SWFType(BasicType.UI16) public int startWidth; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java index cd7c8ef2e..f6f97688f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java @@ -16,11 +16,13 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * * @author JPEXS */ -public class MORPHLINESTYLEARRAY { +public class MORPHLINESTYLEARRAY implements Serializable { public MORPHLINESTYLE[] lineStyles; public MORPHLINESTYLE2[] lineStyles2; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/PIX15.java b/trunk/src/com/jpexs/decompiler/flash/types/PIX15.java index 67c9ab6df..73e1901a3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/PIX15.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/PIX15.java @@ -17,13 +17,14 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * Represents 15-bit red, green and blue value * * @author JPEXS */ -public class PIX15 { +public class PIX15 implements Serializable { /** * Red color value diff --git a/trunk/src/com/jpexs/decompiler/flash/types/PIX24.java b/trunk/src/com/jpexs/decompiler/flash/types/PIX24.java index a646e09db..c980aa857 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/PIX24.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/PIX24.java @@ -18,13 +18,14 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * Represents 15-bit red, green and blue value * * @author JPEXS */ -public class PIX24 { +public class PIX24 implements Serializable { @SWFType(BasicType.UI8) @Reserved diff --git a/trunk/src/com/jpexs/decompiler/flash/types/RGB.java b/trunk/src/com/jpexs/decompiler/flash/types/RGB.java index 268c57c9f..bc58992dd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/RGB.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/RGB.java @@ -18,13 +18,14 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.awt.Color; +import java.io.Serializable; /** * Represents 24-bit red, green, blue value * * @author JPEXS */ -public class RGB { +public class RGB implements Serializable { /** * Red color value diff --git a/trunk/src/com/jpexs/decompiler/flash/types/RGBA.java b/trunk/src/com/jpexs/decompiler/flash/types/RGBA.java index 82f92570d..fc6820864 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/RGBA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/RGBA.java @@ -18,13 +18,14 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.awt.Color; +import java.io.Serializable; /** * Represents 32-bit red, green, blue and alpha value * * @author JPEXS */ -public class RGBA extends RGB { +public class RGBA extends RGB implements Serializable{ /** * Alpha value defining opacity diff --git a/trunk/src/com/jpexs/decompiler/flash/types/SHAPE.java b/trunk/src/com/jpexs/decompiler/flash/types/SHAPE.java index 38277fced..45e58a2ce 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/SHAPE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/SHAPE.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; +import java.io.Serializable; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -27,7 +28,7 @@ import java.util.Set; * * @author JPEXS */ -public class SHAPE implements NeedsCharacters { +public class SHAPE implements NeedsCharacters,Serializable { @SWFType(value = BasicType.UB, count = 4) public int numFillBits; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java index 2f8f5e340..4172337cf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; +import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -25,7 +26,7 @@ import java.util.Set; * * @author JPEXS */ -public class SHAPEWITHSTYLE extends SHAPE implements NeedsCharacters { +public class SHAPEWITHSTYLE extends SHAPE implements NeedsCharacters, Serializable { public FILLSTYLEARRAY fillStyles; public LINESTYLEARRAY lineStyles; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java b/trunk/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java index 0dd7332f1..ec7de58d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class SOUNDENVELOPE { +public class SOUNDENVELOPE implements Serializable { @SWFType(BasicType.UI32) public long pos44; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java b/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java index 8ad52bacb..9ef3d893b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java @@ -19,12 +19,13 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * * @author JPEXS */ -public class SOUNDINFO { +public class SOUNDINFO implements Serializable { @Reserved @SWFType(value = BasicType.UB, count = 2) diff --git a/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java index 392778518..c7a370270 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java @@ -22,13 +22,14 @@ import com.jpexs.decompiler.flash.tags.Tag; import com.jpexs.decompiler.flash.tags.base.FontTag; import com.jpexs.decompiler.flash.types.annotations.Conditional; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; import java.util.List; /** * * @author JPEXS */ -public class TEXTRECORD { +public class TEXTRECORD implements Serializable { public boolean styleFlagsHasFont; public boolean styleFlagsHasColor; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ZONEDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/ZONEDATA.java index c8c62ff52..5294f5dd0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ZONEDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ZONEDATA.java @@ -17,13 +17,14 @@ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; /** * Represents 32-bit alpha, red, green and blue value * * @author JPEXS */ -public class ZONEDATA { +public class ZONEDATA implements Serializable{ @SWFType(BasicType.FLOAT16) public int alignmentCoordinate; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java index 478c775e7..e0f291344 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java @@ -16,12 +16,14 @@ */ package com.jpexs.decompiler.flash.types; +import java.io.Serializable; + /** * Represents 32-bit alpha, red, green and blue value * * @author JPEXS */ -public class ZONERECORD { +public class ZONERECORD implements Serializable{ public ZONEDATA[] zonedata = new ZONEDATA[0]; public boolean zoneMaskX; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java b/trunk/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java new file mode 100644 index 000000000..735282ce1 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 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 . + */ + +package com.jpexs.decompiler.flash.types.annotations; + +/** + * The String field can have large multiline text + * + * @author JPEXS + */ +public @interface Multiline { + +} diff --git a/trunk/src/com/jpexs/decompiler/flash/types/filters/FILTER.java b/trunk/src/com/jpexs/decompiler/flash/types/filters/FILTER.java index e2bca268c..8c83b5e05 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/filters/FILTER.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/filters/FILTER.java @@ -19,13 +19,14 @@ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.decompiler.flash.types.BasicType; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.helpers.SerializableImage; +import java.io.Serializable; /** * Bitmap filter * * @author JPEXS */ -public class FILTER { +public class FILTER implements Serializable { /** * Identificator of type of the filter diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java index 6f61b8a03..91790d3c3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; import java.io.IOException; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -28,7 +29,7 @@ import java.util.List; * * @author JPEXS */ -public class ContourType { +public class ContourType implements Serializable { public int moveToX; public int moveToY; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java index caf2c65df..242bf612b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.Serializable; import java.util.logging.Level; import java.util.logging.Logger; @@ -28,7 +29,7 @@ import java.util.logging.Logger; * * @author JPEXS */ -public class EdgeType { +public class EdgeType implements Serializable { private static final int sizes[] = new int[]{1, 2, 1, 2, 1, 2, 3, 4, 2, 3, 4, 5, 6, 7, 8, 9}; private static final int Edge_H12 = 0; // 2 bytes diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java index 604aa6bb1..c79740562 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; +import java.io.Serializable; /** * * @author JPEXS */ -public class FONTINFO { +public class FONTINFO implements Serializable { public int fontId; public GLYPHIDX glyphIndices[]; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/FontType.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/FontType.java index ac59f38ef..9e5043eb1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/FontType.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/FontType.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.types.gfx; import com.jpexs.decompiler.flash.types.SHAPE; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -26,7 +27,7 @@ import java.util.List; * * @author JPEXS */ -public class FontType { +public class FontType implements Serializable { public static final int FF_Italic = 0x0001; public static final int FF_Bold = 0x0002; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java index 7a6b422bc..73d93fa16 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; +import java.io.Serializable; /** * * @author JPEXS */ -public class GLYPHIDX { +public class GLYPHIDX implements Serializable { public int indexInFont; public int indexInTexture; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java index 98bc808b2..faca1b865 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; +import java.io.Serializable; /** * * @author JPEXS */ -public class GlyphInfoType { +public class GlyphInfoType implements Serializable { public int glyphCode; public int advanceX; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java index d407c4499..5fe1714a9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; import java.io.IOException; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -29,7 +30,7 @@ import java.util.List; * * @author JPEXS */ -public class GlyphType { +public class GlyphType implements Serializable { public int[] boundingBox; public ContourType[] contours; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java index b35a6bf79..852645e15 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; +import java.io.Serializable; /** * * @author JPEXS */ -public class KerningPairType { +public class KerningPairType implements Serializable { public int char1; public int char2; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java index 4a9ca64c8..75a940dac 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; +import java.io.Serializable; /** * * @author JPEXS */ -public class TEXGLYPH { +public class TEXGLYPH implements Serializable { public float uvBoundsLeft; public float uvBoundsTop;