--- /dev/null
+<?xml version="1.0"?>
+<!--
+ * just a crude unzip of non-Jalview classes for development purposes -BH 2018
+-->
+<project name="jalviewX" default="zipvarna" basedir="."
+ xmlns:if="ant:if"
+ xmlns:unless="ant:unless">
+
+ <target name="zipvarna">
+
+
+ <!-- inputs directories -->
+ <property name="resourceDir" value="resources" />
+ <property name="libjsDir" value="libjs"/>
+ <property name="swingjsDir" value="swingjs"/>
+
+ <!-- inputs zip files -->
+ <property name="swingjs.zip" value="${swingjsDir}/SwingJS-site.zip" />
+ <property name="varna.zip" value="${libjsDir}/VARNA-site.zip" />
+
+ <!-- output directories -->
+ <property name="site" value="site"/>
+ <property name="j2sDir" value="${site}/swingjs/j2s"/>
+
+
+ <property name="libjsDir" value="libjs"/>
+
+ <echo> Zipping up ${varna.zip} </echo>
+ <zip destfile="${varna.zip}" basedir="site" includes="fr_*,swingjs/j2s/fr/**" />
+</target>
+</project>
name += " (Model " + mn++ + ")";
}
_rnaList.add(varnaPanel.getConfig().clone(), r, name,
- true);
+ true);
+ // BH 2018 SwingJS clone of varnaPanel or its config will be the object itself, not a clone
}
}
}
*/
public void addStructure(RNA rna)
{
- VARNAConfig config = vp.getConfig().clone();
+ VARNAConfig config = vp.getConfig().clone(); // BH 2018 this will NOT be a clone in SwingJS
addStructure(rna, config);
}
super.setBackground(new Color(0, 0, 0, 120));
}
+ // BH 2018 was lt, not lteq here
+ // SwingJS sets the minimum panel size -- probably incorrectly -- to the size for VARNAPanel
if (getMinimumSize().height <= getSize().height
&& getMinimumSize().width <= getSize().width) {
// Draw Title
e3.printStackTrace();
}
_vp.setPreferredSize(new Dimension(400, 400));
+ //
+
+ // BH 2018 this will NOT be a clone in SwingJS
_rnaList.add(_vp.getConfig().clone(),_RNA2,generateDefaultName());
_rnaList.add(_vp.getConfig().clone(),_RNA1,generateDefaultName(),true);
});
// BH 2018 SwingJS can't clone, as it does not implement serialization
if (/** @j2sNative false && */ true)
- _duplicateButton.addActionListener(new ActionListener() {
+ _duplicateButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
_rnaList.add((VARNAConfig)_vp.getConfig().clone(),_vp.getRNA().clone(),_vp.getRNA().getName()+"-"+DateFormat.getTimeInstance(DateFormat.LONG).format(new Date()),true);
}});
JPanel ops = new JPanel();
ops.setLayout(new GridLayout(1,2));
ops.add(_deleteButton);
- ops.add(_duplicateButton);
+ if (/** @j2sNative false && */ true)
+ ops.add(_duplicateButton);
JPanel opspanel = new JPanel(new BorderLayout());
opspanel.add(ops,BorderLayout.NORTH);