*/
package jalview.gui;
+import jalview.datamodel.SequenceI;
+import jalview.ext.varna.JalviewVarnaBinding;
+import jalview.structure.AtomSpec;
+import jalview.util.MessageManager;
+
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import fr.orsay.lri.varna.models.VARNAConfig;
import fr.orsay.lri.varna.models.rna.RNA;
-import jalview.datamodel.SequenceI;
-import jalview.ext.varna.JalviewVarnaBinding;
-import jalview.structure.AtomSpec;
-import jalview.util.MessageManager;
-
public class AppVarnaBinding extends JalviewVarnaBinding
{
public VARNAPanel vp;
- // remove unused (commented out) fields?
- // protected JPanel _tools = new JPanel();
- //
- // private JPanel _input = new JPanel();
- //
- // private JPanel _strPanel = new JPanel();
- //
- // private JTextField _str = new JTextField();
- //
- // private JTextField _seq = new JTextField();
- //
- // private JLabel _strLabel = new JLabel(
- // MessageManager.getString("label.str"));
- //
- // private JButton _updateButton = new JButton(
- // MessageManager.getString("action.update"));
- //
- // private JButton _deleteButton = new JButton(
- // MessageManager.getString("action.delete"));
- //
- // private JButton _duplicateButton = new JButton(
- // MessageManager.getString("action.snapshot"));
- //
protected JPanel _listPanel = new JPanel();
private ReorderableJList _sideList = null;
_sideList.addMouseListener(new MouseAdapter()
{
@Override
- public void mouseClicked(MouseEvent e) {
+ public void mouseClicked(MouseEvent e)
+ {
AppVarnaBinding.this.mouseClicked(e);
}
});
vp.setBackground(_backgroundColor);
- // MC commented out stuff not added to panel - remove?
- // Font textFieldsFont = Font.decode("MonoSpaced-PLAIN-12");
- //
- // _seq.setFont(textFieldsFont);
- // if (!rnaList.isEmpty())
- // {
- // _seq.setText(rnaList.get(0).getSeq());
- // }
-
- // _updateButton.addActionListener(new ActionListener()
- // {
- // public void actionPerformed(ActionEvent e)
- // {
- // FullBackup sel = (FullBackup) _sideList.getSelectedValue();
- // sel.rna.setSequence("A");
- // }
- // });
- //
- // _strLabel.setPreferredSize(new Dimension(marginTools, 15));
- // _strLabel.setHorizontalTextPosition(JLabel.LEFT);
- // _str.setFont(textFieldsFont);
- // _strPanel.setLayout(new BorderLayout());
- // _strPanel.add(_strLabel, BorderLayout.WEST);
- // _strPanel.add(_str, BorderLayout.CENTER);
- //
- // _input.setLayout(new GridLayout(1, 0));
- // _input.add(_strPanel);
- //
- // JPanel goPanel = new JPanel();
- // goPanel.setLayout(new BorderLayout());
- //
- // _tools.setLayout(new BorderLayout());
- // _tools.add(_input, BorderLayout.CENTER);
- // _tools.add(goPanel, BorderLayout.EAST);
- //
- // goPanel.add(_updateButton, BorderLayout.CENTER);
- //
- // JPanel ops = new JPanel();
- // ops.setLayout(new GridLayout(1, 2));
- // ops.add(_deleteButton);
- // ops.add(_duplicateButton);
-
JLabel j = new JLabel(
MessageManager.getString("label.structures_manager"),
JLabel.CENTER);
_listPanel.add(j, BorderLayout.NORTH);
_listPanel.add(listScroller, BorderLayout.CENTER);
- new DropTarget(vp, new DropTargetAdapter() {
+ new DropTarget(vp, new DropTargetAdapter()
+ {
@Override
public void drop(DropTargetDropEvent dtde)
{
public String[][] getParameterInfo()
{
- String[][] info =
- {
+ String[][] info = {
// Parameter Name Kind of Value Description,
{ "sequenceDBN", "String", "A raw RNA sequence" },
{ "structureDBN", "String",
{
name += " (Model " + mn++ + ")";
}
- _rnaList.add(varnaPanel.getConfig().clone(), r, name, true);
+ _rnaList.add(varnaPanel.getConfig().clone(), r, name,
+ true);
}
}
}
_sideList.ensureIndexIsVisible(index);
/*
- * TODO Object newName = JOptionPane.showInputDialog( this,
+ * TODO Object newName = JvOptionPane.showInputDialog( this,
* "Specify a new name for this RNA", "Rename RNA",
- * JOptionPane.QUESTION_MESSAGE, (Icon)null, null, item.toString()); if
+ * JvOptionPane.QUESTION_MESSAGE, (Icon)null, null, item.toString()); if
* (newName!=null) { item.name = newName.toString();
* this._sideList.repaint(); }
*/
}
@Override
- public String[] getPdbFile()
+ public String[] getStructureFiles()
{
return null;
}
* restore the previous display
*/
vp.showRNA(sel.rna, sel.config);
-
+
return filePath;
} catch (IOException e)
{
*
* @param evt
*/
- protected void changeSelectedStructure_actionPerformed(ListSelectionEvent evt)
+ protected void changeSelectedStructure_actionPerformed(
+ ListSelectionEvent evt)
{
if (!evt.getValueIsAdjusting())
{