+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ boolean editLabelDescription(AlignmentAnnotation annotation)
+ {
+ JLabel idlabel = new JLabel( " Annotation Label ");
+ JLabel desclabel = new JLabel("Annotation Description ");
+ idlabel.setFont(new Font("Courier", Font.PLAIN, 12));
+ desclabel.setFont(new Font("Courier", Font.PLAIN, 12));
+ JTextField id = new JTextField(annotation.label, 40);
+ JTextField description = new JTextField(annotation.description, 40);
+ JPanel panel = new JPanel(new BorderLayout());
+ JPanel panel2 = new JPanel(new BorderLayout());
+ panel2.add(idlabel, BorderLayout.WEST);
+ panel2.add(id, BorderLayout.CENTER);
+ panel.add(panel2, BorderLayout.NORTH);
+ panel2 = new JPanel(new BorderLayout());
+ panel2.add(desclabel, BorderLayout.WEST);
+ panel2.add(description, BorderLayout.CENTER);
+ panel.add(panel2, BorderLayout.SOUTH);
+
+
+ int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
+ panel, "Edit Annotation Name/Description",
+ JOptionPane.OK_CANCEL_OPTION );
+
+
+ if (reply != JOptionPane.OK_OPTION )
+ {
+ return false;
+ }
+
+
+ annotation.label = id.getText().trim();
+
+ String text = description.getText().trim();
+ if(text.length()==0)
+ text = null;
+ annotation.description = text;
+
+ return true;
+ }
+