ActionScript tab is first.

Sprite position adjusted
This commit is contained in:
Jindra Petk
2013-01-13 15:17:11 +01:00
parent af6cb18e2e
commit 4c9e3231b3
2 changed files with 15 additions and 11 deletions

View File

@@ -215,6 +215,16 @@ public class MainFrame extends JFrame implements ActionListener {
getActionScript3(objs, abcList);
getContentPane().add(tabPane, BorderLayout.CENTER);
if (!abcList.isEmpty()) {
tabPane.addTab("ActionScript3", abcPanel = new ABCPanel(abcList));
} else {
actionPanel = new ActionPanel(swf.tags);
if (actionPanel.tagTree.getRowCount() > 1) {
tabPane.addTab("ActionScript", actionPanel);
}
}
if (!shapes.isEmpty()) {
tabPane.addTab("Shapes", new TagPanel(shapes, swf));
}
@@ -239,14 +249,7 @@ public class MainFrame extends JFrame implements ActionListener {
/*tabPane.addTab("Tags", new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(tagTree), new JScrollPane(fPanel)));*/
//tabPane.setTabPlacement(JTabbedPane.TOP);
if (!abcList.isEmpty()) {
tabPane.addTab("ActionScript3", abcPanel = new ABCPanel(abcList));
} else {
actionPanel = new ActionPanel(swf.tags);
if (actionPanel.tagTree.getRowCount() > 1) {
tabPane.addTab("ActionScript", actionPanel);
}
}
loadingPanel.setPreferredSize(new Dimension(30, 30));

View File

@@ -29,6 +29,7 @@ import com.jpexs.asdec.tags.DefineFont3Tag;
import com.jpexs.asdec.tags.DefineFontTag;
import com.jpexs.asdec.tags.DefineMorphShape2Tag;
import com.jpexs.asdec.tags.DefineMorphShapeTag;
import com.jpexs.asdec.tags.DefineSpriteTag;
import com.jpexs.asdec.tags.DefineTextTag;
import com.jpexs.asdec.tags.DoABCTag;
import com.jpexs.asdec.tags.DoActionTag;
@@ -201,9 +202,9 @@ public class TagPanel extends JPanel implements ListSelectionListener {
mat.translateY = -r.Ymin;
mat.translateX = mat.translateX + width / 2 - r.getWidth() / 2;
mat.translateY = mat.translateY + height / 2 - r.getHeight() / 2;
} else {
mat.translateX = width / 2;
mat.translateY = height / 2;
}else {
mat.translateX = width / 4;
mat.translateY = height / 4;
}
if (tagObj instanceof FontTag) {