1 /*** 2 * 3 */ 4 package org.telscenter.pas.ui.dialog; 5 6 import javax.swing.AbstractAction; 7 import javax.swing.BorderFactory; 8 import javax.swing.JPanel; 9 10 import org.telscenter.pas.common.ui.layouts.EqualsLayout; 11 import org.telscenter.pas.steps.actions.DialogSaveAction; 12 13 /*** 14 * @author aperritano 15 * 16 */ 17 public class PasStudentAssessmentConfirmDialogUI extends PasMessageDialogUI { 18 19 private AbstractAction submitAnswersAction; 20 21 public PasStudentAssessmentConfirmDialogUI() { 22 super(); 23 } 24 25 public PasStudentAssessmentConfirmDialogUI(AbstractAction submitAnswersAction) { 26 this.submitAnswersAction = submitAnswersAction; 27 } 28 protected void addButtonActions() { 29 getCancelButton().setAction(new DialogSaveAction("Continue Working")); 30 getOkButton().setAction(submitAnswersAction); 31 } 32 33 protected void arrangeButtons() { 34 buttonPanel = new JPanel(new EqualsLayout( 35 EqualsLayout.HORIZONTAL, EqualsLayout.RIGHT, 1)); 36 buttonPanel.add(okButton); 37 okButton.setText("Lock & Save Assessment"); 38 39 buttonPanel.add(cancelButton); 40 buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5)); 41 buttonPanel.setOpaque(false); 42 } 43 44 }