import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
-import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Date;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.DefaultListSelectionModel;
-import javax.swing.Icon;
import javax.swing.JButton;
-import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
-import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.ListSelectionModel;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
{
// super("VARNA in Jalview");
initVarna(seq, struc);
+
}
public AppVarnaBinding(ArrayList<RNA> rnaList)
{
+
// super("VARNA in Jalview");
initVarnaEdit(rnaList);
}
private void initVarna(String seq, String str)
{
+
DefaultListModel dlm = new DefaultListModel();
DefaultListSelectionModel m = new DefaultListSelectionModel();
try
{
+
vp = new VARNAPanel("0", ".");
_RNA1.setRNA(seq, str);
_RNA1.drawRNARadiate(vp.getConfig());
private void initVarnaEdit(ArrayList<RNA> rnaInList)
{
+
DefaultListModel dlm = new DefaultListModel();
int marginTools = 40;
FullBackup sel = (FullBackup) _sideList.getSelectedValue();
Mapping map = Mapping.DefaultOutermostMapping(vp.getRNA()
.getSize(), sel.rna.getSize());
- vp.showRNAInterpolated(sel.rna, sel.config, map);
+ //vp.showRNAInterpolated(sel.rna, sel.config, map);
+ vp.showRNA(sel.rna, sel.config);
// _seq.setText(sel.rna.getSeq());
_str.setText(sel.rna.getStructDBN());
}
try
{
+
vp = new VARNAPanel("0", ".");
for (int i = 0; i < rnaInList.size(); i++)
{
rnaInList.get(i).drawRNARadiate(vp.getConfig());
+
}
} catch (ExceptionNonEqualLength e)
{
public void onUINewStructure(VARNAConfig v, RNA r)
{
- _rnaList.add(v, r, "", true);
+ // patch to fix infinite loop
+ // The problem is that onUINewStructure is called when user clicks
+ // check with Yann about whether Jalview should do anything with this event.
+ // e.g. if user has used VARNA's menu to import a structure .. Jalview may need to be told which structure is displayed.
+
+ // _rnaList.add(v, r, "", true);
}
public void onWarningEmitted(String s)
// TODO Auto-generated method stub
}
+
+ @Override
+ public void onZoomLevelChanged()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void onTranslationChanged()
+ {
+ // TODO Auto-generated method stub
+
+ }
}
/*