JLabel timeLimitLbl = new JLabel("Time limit for each screening page:");
timeLimitLayout.add(timeLimitLbl);
timeLimitLayout.add(Box.createHorizontalGlue());
timeLimitSpinnerModel = new SpinnerNumberModel(0, // inital value
0, // min
300, // max
1); // step
JSpinner timeLimitSpinner = new JSpinner(timeLimitSpinnerModel);
timeLimitSpinner.setMaximumSize(maxRightSide);
timeLimitLayout.add(timeLimitSpinner);
Box timeLimitMsgBox = new Box(BoxLayout.X_AXIS);
timeLimitPanel.add(timeLimitMsgBox);
JLabel timeLimitMsgLbl = new JLabel("Time out message:");
timeLimitMsgBox.add(timeLimitMsgLbl);
//timeLimitMsgBox.add( Box.createHorizontalGlue() );
timeoutMsgField = new JTextField();
timeoutMsgField.setPreferredSize( fieldPrefSize );
timeoutMsgField.setMaximumSize(maxRightSide);
timeLimitMsgBox.add(timeoutMsgField);
/*************************************************/
JPanel threatImagesPanel = new JPanel();
threatImagesPanel.setBorder( BorderFactory.createTitledBorder("Images with a threat") );
threatImagesPanel.setLayout( new BoxLayout(threatImagesPanel, BoxLayout.Y_AXIS) );
pan.add(threatImagesPanel);
pan.add( Box.createVerticalStrut( 8 ));
Box threatImgCnLayout = new Box( BoxLayout.X_AXIS );
threatImagesPanel.add(threatImgCnLayout);
JLabel threatImagesNum = new JLabel("Number of images:");
threatImgCnLayout.add(threatImagesNum);
threatImgCnLayout.add(Box.createHorizontalGlue());
threatImagesSpinnerModel = new SpinnerNumberModel(1, //initial value
1, //min
99, // max
1); // step
JSpinner threatImagesSpinner = new JSpinner( threatImagesSpinnerModel );
threatImagesSpinner.setMaximumSize(maxRightSide);
threatImgCnLayout.add(threatImagesSpinner);
Box threatAlertLayout = new Box(BoxLayout.X_AXIS);
threatImagesPanel.add(threatAlertLayout);
JLabel threatAlertLbl = new JLabel("Number of images to show alert for:");
threatAlertLayout.add(threatAlertLbl);
threatAlertLayout.add(Box.createHorizontalGlue());
threatAlertSpinnerModel = new SpinnerNumberModel(1, //initial value
1, // min
99, // max
1);// step
JSpinner threatAlertSpinner = new JSpinner(threatAlertSpinnerModel);
threatAlertSpinner.setMaximumSize(maxRightSide);
threatAlertLayout.add(threatAlertSpinner);
/*************************************************/
JPanel noThreatImagesPanel = new JPanel();
noThreatImagesPanel.setBorder( BorderFactory.createTitledBorder("Images without a threat") );
noThreatImagesPanel.setLayout( new BoxLayout(noThreatImagesPanel, BoxLayout.Y_AXIS) );
pan.add(noThreatImagesPanel);
pan.add( Box.createVerticalStrut( 8 ));
Box noThreatImgCnlayout = new Box( BoxLayout.X_AXIS );
noThreatImagesPanel.add(noThreatImgCnlayout);
JLabel noThreatImagesNum = new JLabel("Number Of Images:");
noThreatImgCnlayout.add(noThreatImagesNum);
noThreatImgCnlayout.add(Box.createHorizontalGlue());
noThreatImagesSpinnerModel = new SpinnerNumberModel(1, // initial value
1, // min
99, // max
1); // step
JSpinner noThreatImagesSpinner = new JSpinner( noThreatImagesSpinnerModel );
noThreatImagesSpinner.setMaximumSize(maxRightSide);
noThreatImgCnlayout.add(noThreatImagesSpinner);
Box noThreatAlertLayout = new Box( BoxLayout.X_AXIS );
noThreatImagesPanel.add(noThreatAlertLayout);
JLabel noThreatAlertLbl = new JLabel("Number of images to show alert for:");
noThreatAlertLayout.add(noThreatAlertLbl);
noThreatAlertLayout.add(Box.createHorizontalGlue());
noThreatAlertSpinnerModel = new SpinnerNumberModel(1, // initial value
1, // min
99, // max
1); // step
JSpinner noThreatAlertSpinner = new JSpinner(noThreatAlertSpinnerModel);
noThreatAlertSpinner.setMaximumSize(maxRightSide);
noThreatAlertLayout.add(noThreatAlertSpinner);
/*************************************************/
JPanel passFailPanel = new JPanel();
passFailPanel.setLayout( new BoxLayout(passFailPanel, BoxLayout.Y_AXIS));
passFailPanel.setBorder( BorderFactory.createTitledBorder("Button Caption"));
pan.add(passFailPanel);
pan.add( Box.createVerticalStrut( 8 ));
Box passBox = new Box(BoxLayout.X_AXIS);
passFailPanel.add(passBox);
JLabel passLbl = new JLabel("Pass Caption");
passBox.add(passLbl);
passBox.add(Box.createHorizontalGlue());
passCaptionTField = new JTextField(conf.defaultPassBtnCaption);
passCaptionTField.setMaximumSize(new Dimension(200, 20) );
passBox.add(passCaptionTField);
Box failBox = new Box(BoxLayout.X_AXIS);
passFailPanel.add(failBox);
JLabel failLbl = new JLabel("Pass Caption");
failBox.add(failLbl);
failBox.add(Box.createHorizontalGlue());
failCaptionTField = new JTextField(conf.defaultFailBtnCaption);
failCaptionTField.setMaximumSize(new Dimension(200, 20) );
failBox.add(failCaptionTField);
/*************** Confidence *************************/
JPanel confidencePanel = new JPanel();
confidencePanel.setLayout( new BoxLayout(confidencePanel, BoxLayout.Y_AXIS));
confidencePanel.setBorder( BorderFactory.createTitledBorder("Confidence Level"));
pan.add(confidencePanel);
pan.add( Box.createVerticalStrut( 8 ));
Box confidenceLevelLayout = new Box( BoxLayout.X_AXIS );
confidencePanel.add(confidenceLevelLayout);
JLabel confidenceLbl = new JLabel("Scale");
confidenceLevelLayout.add(confidenceLbl);
confidenceLevelLayout.add(Box.createHorizontalGlue());
confidenceLevelModel = new SpinnerNumberModel(0, // initial value
0, // min
10, // max
1); // step
JSpinner confidenceLevelSpinner = new JSpinner(confidenceLevelModel);
confidenceLevelSpinner.setMaximumSize(maxRightSide);
confidenceLevelLayout.add(confidenceLevelSpinner);
// ***** msg title
Box confiMsgLayout = new Box( BoxLayout.X_AXIS );
confidencePanel.add( confiMsgLayout );
JLabel confiMsgCaptionLbl = new JLabel("Caption");
confiMsgLayout.add(confiMsgCaptionLbl);
confiMsgLayout.add( Box.createHorizontalGlue() );
confiCaptionField = new JTextField( conf.defaultConfidenceTitle );
confiCaptionField.setMaximumSize( maxRightSide );
confiCaptionField.setPreferredSize( fieldPrefSize );
confiMsgLayout.add(confiCaptionField);
// ***** left caption row
Box confiLeftCaptionLayout = new Box( BoxLayout.X_AXIS);
confidencePanel.add(confiLeftCaptionLayout);
JLabel confiLeftCaptionLbl = new JLabel("Left caption");
confiLeftCaptionLayout.add(confiLeftCaptionLbl);
confiLeftCaptionLayout.add(Box.createHorizontalGlue());
confiLeftCaptionTField= new JTextField(conf.defaultConfidenceLeft);
confiLeftCaptionTField.setMaximumSize(maxRightSide);
confiLeftCaptionLayout.add(confiLeftCaptionTField);
// ***** right caption row
Box confiRightCaptionLayout = new Box( BoxLayout.X_AXIS);
confidencePanel.add(confiRightCaptionLayout);
JLabel confiRightCaptionLbl = new JLabel("Right caption");
confiRightCaptionLayout.add(confiRightCaptionLbl);
confiRightCaptionLayout.add(Box.createHorizontalGlue());
confiRightCaptionTField= new JTextField(conf.defaultConfidenceRight);
confiRightCaptionTField.setMaximumSize(maxRightSide);
confiRightCaptionLayout.add(confiRightCaptionTField);
/*************************************************/
JPanel alarmPanel = new JPanel();
alarmPanel.setLayout( new BoxLayout(alarmPanel, BoxLayout.Y_AXIS));
alarmPanel.setBorder(BorderFactory.createTitledBorder("Alarm and Image Apearance"));
pan.add(alarmPanel);
pan.add( Box.createVerticalStrut( 8 ));
// alarm duration spinner
Box alarmDurationLayout = new Box( BoxLayout.X_AXIS);
alarmPanel.add(alarmDurationLayout);
JLabel alarmDurationLbl = new JLabel("Alarm duration");
alarmDurationLayout.add(alarmDurationLbl);
alarmDurationLayout.add(Box.createHorizontalGlue());
alarmDurationSpinnerModel = new SpinnerNumberModel(0, // initial value
0, // min
59, // max
1);
JSpinner alarmDurationSpinner = new JSpinner(alarmDurationSpinnerModel);
alarmDurationSpinner.setMaximumSize(maxRightSide);
alarmDurationLayout.add(alarmDurationSpinner);
// alarm delay spinner
Box alarmDelayLayout = new Box( BoxLayout.X_AXIS);
alarmPanel.add(alarmDelayLayout);
JLabel alarmDelayLbl = new JLabel("Alarm delay");
alarmDelayLayout.add(alarmDelayLbl);
alarmDelayLayout.add(Box.createHorizontalGlue());
alarmDelaySpinnerModel = new SpinnerNumberModel(0, // initial value
0, // min
59, // max
1);
JSpinner alarmDelaySpinner = new JSpinner(alarmDelaySpinnerModel);
alarmDelaySpinner.setMaximumSize(maxRightSide);
alarmDelayLayout.add(alarmDelaySpinner);
// image delay spinner
Box imgDelayLayout = new Box( BoxLayout.X_AXIS);
alarmPanel.add(imgDelayLayout);
JLabel imgDelayLbl = new JLabel("Image delay");
imgDelayLayout.add(imgDelayLbl);
imgDelayLayout.add(Box.createHorizontalGlue());
imgDelaySpinnerModel = new SpinnerNumberModel(0, // initial value
0, // min
59, // max
1);
JSpinner imgDelaySpinner = new JSpinner(imgDelaySpinnerModel);
imgDelaySpinner.setMaximumSize(maxRightSide);