}\r
});\r
sequenceMenu.setText("Sequence");\r
- sequenceName.setText("Edit name");\r
+ sequenceName.setText("Edit Name/Desciption");\r
sequenceName.addActionListener(new java.awt.event.ActionListener()\r
{\r
public void actionPerformed(ActionEvent e)\r
*/\r
void refresh()\r
{\r
- SequenceGroup sg = getGroup();\r
- if(sg!=null)\r
- {\r
- SuperGroup superG = ap.av.alignment.getSuperGroup(sg);\r
-\r
- if (superG != null)\r
- {\r
- superG.setSuperGroupProperties(sg);\r
- }\r
- }\r
if (ap.overviewPanel != null)\r
ap.overviewPanel.updateOverviewImage();\r
\r
*/\r
void sequenceName_actionPerformed(ActionEvent e)\r
{\r
- String id = sequence.getName();\r
- String s = (String) JOptionPane.showInternalInputDialog(ap,\r
- "Edit sequence name",\r
- "Edit sequence name (" + sequence.getName() + ")",\r
- JOptionPane.PLAIN_MESSAGE, null, null, id);\r
+ JLabel idlabel = new JLabel( " Sequence Name ");\r
+ JLabel desclabel = new JLabel("Sequence Description ");\r
+ idlabel.setFont(new Font("Courier", Font.PLAIN, 12));\r
+ desclabel.setFont(new Font("Courier", Font.PLAIN, 12));\r
+ JTextField id = new JTextField(sequence.getName(), 40);\r
+ JTextField description = new JTextField(sequence.getDescription(), 40);\r
+ JPanel panel = new JPanel(new BorderLayout());\r
+ JPanel panel2 = new JPanel(new BorderLayout());\r
+ panel2.add(idlabel, BorderLayout.WEST);\r
+ panel2.add(id, BorderLayout.CENTER);\r
+ panel.add(panel2, BorderLayout.NORTH);\r
+ panel2 = new JPanel(new BorderLayout());\r
+ panel2.add(desclabel, BorderLayout.WEST);\r
+ panel2.add(description, BorderLayout.CENTER);\r
+ panel.add(panel2, BorderLayout.SOUTH);\r
+\r
+\r
+ int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,\r
+ panel, "Edit Sequence Name/Description",\r
+ JOptionPane.OK_CANCEL_OPTION );\r
+\r
+\r
+ if (reply != JOptionPane.OK_OPTION )\r
+ {\r
+ return;\r
+ }\r
+\r
+ String s = id.getText();\r
\r
if (s != null)\r
{\r
sequence.setName(s);\r
ap.repaint();\r
}\r
+\r
+ sequence.getDatasetSequence().setDescription(description.getText());\r
+ sequence.setDescription(description.getText());\r
}\r
\r
/**\r