private JLabel _strLabel = new JLabel(" Str:");
private JLabel _seqLabel = new JLabel(" Seq:");
private JButton _createButton = new JButton("Create");
+ private JButton _updateButton = new JButton("Update");
private JButton _deleteButton = new JButton("Delete");
private JButton _duplicateButton = new JButton("Snapshot");
DefaultListModel dlm = new DefaultListModel();
- //int marginTools = 40;
+ int marginTools = 40;
DefaultListSelectionModel m = new DefaultListSelectionModel();
m.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
Mapping map = Mapping.DefaultOutermostMapping(vp.getRNA().getSize(), sel.rna.getSize());
vp.showRNAInterpolated(sel.rna,sel.config,map);
//_seq.setText(sel.rna.getSeq());
- //_str.setText(sel.rna.getStructDBN());
+ _str.setText(sel.rna.getStructDBN());
}
}
});
vp.setBackground(_backgroundColor);
- /*
+
Font textFieldsFont = Font.decode("MonoSpaced-PLAIN-12");
- _seqLabel.setHorizontalTextPosition(JLabel.LEFT);
- _seqLabel.setPreferredSize(new Dimension(marginTools, 15));
+ //_seqLabel.setHorizontalTextPosition(JLabel.LEFT);
+ //_seqLabel.setPreferredSize(new Dimension(marginTools, 15));
_seq.setFont(textFieldsFont);
_seq.setText(rnaInList.get(0).getSeq());
-
- _createButton.addActionListener(new ActionListener() {
+
+ _updateButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- try {
+ FullBackup sel = (FullBackup) _sideList.getSelectedValue();
+ sel.rna.setSequence("A");
+ /*try {
RNA nRNA = new RNA(generateDefaultName());
nRNA.setRNA(_seq.getText(), _str.getText());
nRNA.drawRNARadiate(vp.getConfig());
JOptionPane.showMessageDialog(vp, e1.getMessage(),"Error", JOptionPane.ERROR_MESSAGE);
} catch (ExceptionFileFormatOrSyntax e1) {
JOptionPane.showMessageDialog(vp, e1.getMessage(),"Error", JOptionPane.ERROR_MESSAGE);
- }
+ }*/
}
});
- _seqPanel.setLayout(new BorderLayout());
- _seqPanel.add(_seqLabel, BorderLayout.WEST);
- _seqPanel.add(_seq, BorderLayout.CENTER);
+ //_seqPanel.setLayout(new BorderLayout());
+ //_seqPanel.add(_seqLabel, BorderLayout.WEST);
+ //_seqPanel.add(_seq, BorderLayout.CENTER);
_strLabel.setPreferredSize(new Dimension(marginTools, 15));
_strLabel.setHorizontalTextPosition(JLabel.LEFT);
_strPanel.add(_strLabel, BorderLayout.WEST);
_strPanel.add(_str, BorderLayout.CENTER);
- _input.setLayout(new GridLayout(2, 0));
- _input.add(_seqPanel);
+ _input.setLayout(new GridLayout(1, 0));
+ //_input.add(_seqPanel);
_input.add(_strPanel);
JPanel goPanel = new JPanel();
_tools.setLayout(new BorderLayout());
_tools.add(_input, BorderLayout.CENTER);
- _tools.add(_info, BorderLayout.SOUTH);
+ //_tools.add(_info, BorderLayout.SOUTH);
_tools.add(goPanel, BorderLayout.EAST);
- _deleteButton.addActionListener(new ActionListener() {
+ /*_deleteButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
_rnaList.removeSelected();
}
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);
}});
- goPanel.add(_createButton, BorderLayout.CENTER);
*/
+ 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("Structures Manager",JLabel.CENTER);
_listPanel.setLayout(new BorderLayout());
_listPanel.add(ops,BorderLayout.SOUTH);
_listPanel.add(j,BorderLayout.NORTH);
_listPanel.add(listScroller,BorderLayout.CENTER);
-
+
//JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,_listPanel,vp);