From 3faf329052763eadeaf6fe8dbf68cf2f48ea353e Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Date: Fri, 17 Jun 2011 10:16:40 +0000 Subject: [PATCH] AVATAR design: changing edition of transitions --- src/ui/avatarsmd/AvatarSMDTransitionInfo.java | 2 +- src/ui/window/JDialogAvatarTransition.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ui/avatarsmd/AvatarSMDTransitionInfo.java b/src/ui/avatarsmd/AvatarSMDTransitionInfo.java index 1d13580473..189f8a5259 100755 --- a/src/ui/avatarsmd/AvatarSMDTransitionInfo.java +++ b/src/ui/avatarsmd/AvatarSMDTransitionInfo.java @@ -232,7 +232,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent { Vector attributes = tdp.getMGUI().getAllAttributes(); Vector methods = tdp.getMGUI().getAllMethods(); JDialogAvatarTransition jdat = new JDialogAvatarTransition(frame, "Setting transition parameters", guard, afterMin, afterMax, computeMin, computeMax, listOfActions, attributes, methods, filesToInclude, codeToInclude); - jdat.setSize(700, 500); + jdat.setSize(500, 600); GraphicLib.centerOnParent(jdat); jdat.show(); // blocked until dialog has been closed diff --git a/src/ui/window/JDialogAvatarTransition.java b/src/ui/window/JDialogAvatarTransition.java index 0027273953..63617dbd81 100755 --- a/src/ui/window/JDialogAvatarTransition.java +++ b/src/ui/window/JDialogAvatarTransition.java @@ -244,8 +244,10 @@ public class JDialogAvatarTransition extends javax.swing.JDialog implements Acti jtaFiles.setMargin(new Insets(10, 10, 10, 10)); jtaFiles.setTabSize(3); String files = ""; - for(i=0; i<filesToInclude.length; i++) { - files += filesToInclude[i] + "\n"; + if (filesToInclude != null) { + for(i=0; i<filesToInclude.length; i++) { + files += filesToInclude[i] + "\n"; + } } jtaFiles.append(files); jtaFiles.setFont(new Font("times", Font.PLAIN, 12)); @@ -258,8 +260,10 @@ public class JDialogAvatarTransition extends javax.swing.JDialog implements Acti jtaCode.setMargin(new Insets(10, 10, 10, 10)); jtaCode.setTabSize(3); String code = ""; - for(i=0; i<codeToInclude.length; i++) { - code += codeToInclude[i] + "\n"; + if (codeToInclude != null) { + for(i=0; i<codeToInclude.length; i++) { + code += codeToInclude[i] + "\n"; + } } jtaCode.append(code); jtaCode.setFont(new Font("times", Font.PLAIN, 12)); -- GitLab