X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppVarnaBinding.java;h=8ab1e61d959ad30dfc8c1edc111957c44e9f2e90;hb=633ae27e1786a9e4da2238e75807de3a276dee43;hp=956c2e12726ac245adde2d7758aa7c7b8ad9590e;hpb=21fccb30635d61dbf7ad0f266a88f07fb87358f7;p=jalview.git diff --git a/src/jalview/gui/AppVarnaBinding.java b/src/jalview/gui/AppVarnaBinding.java index 956c2e1..8ab1e61 100644 --- a/src/jalview/gui/AppVarnaBinding.java +++ b/src/jalview/gui/AppVarnaBinding.java @@ -20,6 +20,11 @@ */ 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; @@ -59,38 +64,10 @@ import fr.orsay.lri.varna.models.FullBackup; 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; @@ -136,7 +113,8 @@ public class AppVarnaBinding extends JalviewVarnaBinding _sideList.addMouseListener(new MouseAdapter() { @Override - public void mouseClicked(MouseEvent e) { + public void mouseClicked(MouseEvent e) + { AppVarnaBinding.this.mouseClicked(e); } }); @@ -165,48 +143,6 @@ public class AppVarnaBinding extends JalviewVarnaBinding 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); @@ -215,7 +151,8 @@ public class AppVarnaBinding extends JalviewVarnaBinding _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) { @@ -263,8 +200,7 @@ public class AppVarnaBinding extends JalviewVarnaBinding public String[][] getParameterInfo() { - String[][] info = - { + String[][] info = { // Parameter Name Kind of Value Description, { "sequenceDBN", "String", "A raw RNA sequence" }, { "structureDBN", "String", @@ -352,7 +288,8 @@ public class AppVarnaBinding extends JalviewVarnaBinding { name += " (Model " + mn++ + ")"; } - _rnaList.add(varnaPanel.getConfig().clone(), r, name, true); + _rnaList.add(varnaPanel.getConfig().clone(), r, name, + true); } } } @@ -437,9 +374,9 @@ public class AppVarnaBinding extends JalviewVarnaBinding _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(); } */ @@ -547,7 +484,7 @@ public class AppVarnaBinding extends JalviewVarnaBinding * restore the previous display */ vp.showRNA(sel.rna, sel.config); - + return filePath; } catch (IOException e) { @@ -565,7 +502,8 @@ public class AppVarnaBinding extends JalviewVarnaBinding * * @param evt */ - protected void changeSelectedStructure_actionPerformed(ListSelectionEvent evt) + protected void changeSelectedStructure_actionPerformed( + ListSelectionEvent evt) { if (!evt.getValueIsAdjusting()) {