OSDN Git Service

minor fixes to create preview panel
authorbadlogic <badlogicgames@gmail.com>
Mon, 9 Sep 2013 18:24:50 +0000 (20:24 +0200)
committerbadlogic <badlogicgames@gmail.com>
Mon, 9 Sep 2013 18:24:50 +0000 (20:24 +0200)
extensions/gdx-setup-ui/src/aurelienribon/gdxsetupui/ui/panels/PreviewPanel.java

index f6e3233..06461b6 100644 (file)
@@ -114,14 +114,18 @@ public class PreviewPanel extends javax.swing.JPanel {
                        DefaultMutableTreeNode desktopPrjNode = nodes.get("#DIR#prj-desktop");
                        DefaultMutableTreeNode androidPrjNode = nodes.get("#DIR#prj-android");
                        DefaultMutableTreeNode htmlPrjNode = nodes.get("#DIR#prj-html");
-                        DefaultMutableTreeNode iosPrjNode = nodes.get("#DIR#prj-ios");
+                       DefaultMutableTreeNode iosPrjNode = nodes.get("#DIR#prj-ios");
+                       DefaultMutableTreeNode robovmPrjNode = nodes.get("#DIR#prj-robovm");
 
                        rootNode.removeAllChildren();
                        rootNode.add(commonPrjNode);
                        if (Ctx.cfgSetup.isDesktopIncluded) rootNode.add(desktopPrjNode);
                        if (Ctx.cfgSetup.isAndroidIncluded) rootNode.add(androidPrjNode);
                        if (Ctx.cfgSetup.isHtmlIncluded) rootNode.add(htmlPrjNode);
-                        if (Ctx.cfgSetup.isIosIncluded) rootNode.add(iosPrjNode);
+         if (Ctx.cfgSetup.isIosIncluded) {
+               rootNode.add(iosPrjNode);
+               rootNode.add(robovmPrjNode);
+         }
 
                        updateSrc();
                        updateLibs();
@@ -224,13 +228,16 @@ public class PreviewPanel extends javax.swing.JPanel {
                        DefaultMutableTreeNode desktopLibsNode = nodes.get("#DIR#prj-desktop/libs");
                        DefaultMutableTreeNode androidLibsNode = nodes.get("#DIR#prj-android/libs");
                        DefaultMutableTreeNode htmlLibsNode = nodes.get("#DIR#prj-html/war/WEB-INF/lib");
-                        DefaultMutableTreeNode iosLibsNode = nodes.get("#DIR#prj-ios/libs");
+         DefaultMutableTreeNode iosLibsNode = nodes.get("#DIR#prj-ios/libs");
+         DefaultMutableTreeNode robovmLibsNode = nodes.get("#DIR#prj-robovm/libs");
                        DefaultMutableTreeNode dataNode = nodes.get("#DIR#prj-android/assets");
 
                        commonLibsNode.removeAllChildren();
                        desktopLibsNode.removeAllChildren();
                        androidLibsNode.removeAllChildren();
                        htmlLibsNode.removeAllChildren();
+                       iosLibsNode.removeAllChildren();
+                       robovmLibsNode.removeAllChildren();
                        dataNode.removeAllChildren();
 
                        for (String libraryName : Ctx.cfgSetup.libraries) {
@@ -239,7 +246,8 @@ public class PreviewPanel extends javax.swing.JPanel {
                                for (String path : def.libsDesktop) pathToNodes(path, desktopLibsNode);
                                for (String path : def.libsAndroid) pathToNodes(path, androidLibsNode);
                                for (String path : def.libsHtml) pathToNodes(path, htmlLibsNode);
-                                for (String path : def.libsIos) pathToNodes(path, iosLibsNode);
+                               for (String path : def.libsIos) pathToNodes(path, iosLibsNode);
+                               for (String path : def.libsRobovm) pathToNodes(path, robovmLibsNode);
                                for (String path : def.data) pathToNodes(path, dataNode);                              
                        }
                }
@@ -283,7 +291,8 @@ public class PreviewPanel extends javax.swing.JPanel {
                                        if (isDir && name.equals("prj-desktop")) name = Ctx.cfgSetup.projectName + Ctx.cfgSetup.suffixDesktop;
                                        if (isDir && name.equals("prj-android")) name = Ctx.cfgSetup.projectName + Ctx.cfgSetup.suffixAndroid;
                                        if (isDir && name.equals("prj-html")) name = Ctx.cfgSetup.projectName + Ctx.cfgSetup.suffixHtml;
-                                        if (isDir && name.equals("prj-ios")) name = Ctx.cfgSetup.projectName + Ctx.cfgSetup.suffixIos;
+                                       if (isDir && name.equals("prj-ios")) name = Ctx.cfgSetup.projectName + Ctx.cfgSetup.suffixIos;
+                                       if (isDir && name.equals("prj-robovm")) name = Ctx.cfgSetup.projectName + Ctx.cfgSetup.suffixRobovm;
 
                                        label.setText(FilenameUtils.getName(name));
                                        label.setIcon(isDir ? Res.getImage("gfx/ic_folder.png") : Res.getImage("gfx/ic_file.png"));