Skip to content
Snippets Groups Projects
Commit a69fd5c1 authored by Erik Diers's avatar Erik Diers
Browse files

GroupID is now a ComboBox, instead of a plain text field

parent 23d8fd32
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -67,7 +67,7 @@ import com.toedter.calendar.JDateChooser;
**/
public class AppJ_V03 extends JFrame {
private static final String currentSoftwareVersion = "20240329";
private static final String currentSoftwareVersion = "20240403";
private static final long serialVersionUID = 1L;
......@@ -375,7 +375,7 @@ public class AppJ_V03 extends JFrame {
**/
String dt = null; //predefined for date
//------------------------------------------ SFB meta data ----------------------------------------------
String p_group_id = "";
String p_group_id = "-";
String p_experiment_title = "";
String p_creator = "";
String p_contributor = "";
......@@ -633,7 +633,7 @@ public class AppJ_V03 extends JFrame {
JLabel group_id = new JLabel("<html>Group ID <BR><font size = 2> The SFB1280 ID of your group. </font></html>");
group_id.setForeground(new Color(211, 211, 211));
group_id.setFont(new Font("Tahoma", Font.BOLD, 14));
group_id.setBounds(40, 32, 173, 42);
group_id.setBounds(40, 42, 173, 42);
panel_meta.add(group_id);
JLabel experiment_title = new JLabel("<html>Experiment Title<BR><font size = 2> Use a proper description of your experiment. </font></html>");
......@@ -759,13 +759,15 @@ public class AppJ_V03 extends JFrame {
lblHighlyRecommended.setBounds(152, 0, 243, 34);
southPanel.add(lblHighlyRecommended);
JTextField group_id_txt = new JTextField(p_group_id);
JComboBox<String> group_id_txt = new JComboBox<String>();//new JTextField(p_group_id);
group_id_txt.setFont(new Font("Tahoma", Font.PLAIN, 13));
group_id_txt.setModel(new DefaultComboBoxModel<String>( new String[] {"-", "A01", "A02", "A03", "A04", "A05", "A06", "A07", "A08", "A09", "A10", "A11", "A12", "A13", "A14", "A15", "A16", "A18", "A19", "A21", "F01", "F02"}));
group_id_txt.setBackground(new Color(220, 220, 220));
group_id_txt.setColumns(10);
group_id_txt.setBounds(268, 51, 185, 42);
group_id_txt.setSelectedItem(p_group_id);
panel_meta.add(group_id_txt);
JTextField experiment_title_txt = new JTextField(p_experiment_title);
experiment_title_txt.setFont(new Font("Tahoma", Font.PLAIN, 13));
experiment_title_txt.setColumns(10);
......@@ -1788,7 +1790,7 @@ public class AppJ_V03 extends JFrame {
} else if(cmd.equals(EXIT)) {
if(contributor_txt.getText().trim().isEmpty()
|| creator_txt.getText().trim().isEmpty()
|| group_id_txt.getText().trim().isEmpty()
|| group_id_txt.getSelectedItem().toString().equals("-")
|| experiment_title_txt.getText().trim().isEmpty()
|| subject_id_txt.getText().trim().isEmpty()
|| subject_species_txt.getSelectedItem().toString().isEmpty()
......@@ -1819,7 +1821,7 @@ public class AppJ_V03 extends JFrame {
obj.put("Software version", currentSoftwareVersion); // Old-version: 20200909
//..........................................................................
// SFB meta data
obj.put("Group ID", group_id_txt.getText());
obj.put("Group ID", group_id_txt.getSelectedItem().toString());
obj.put("Experiment title", experiment_title_txt.getText());
obj.put("Creator", creator_txt.getText());
obj.put("Contributor", contributor_txt.getText());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment