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 PasSystemExitConfirmDialogUI extends PasMessageDialogUI {
18
19 private AbstractAction systemExitAction;
20
21 public PasSystemExitConfirmDialogUI() {
22 super();
23 }
24
25 public PasSystemExitConfirmDialogUI(AbstractAction systemExitAction) {
26 this.systemExitAction = systemExitAction;
27 }
28 protected void addButtonActions() {
29 getCancelButton().setAction(new DialogSaveAction("No"));
30 getOkButton().setAction(systemExitAction);
31 }
32
33 protected void arrangeButtons() {
34 buttonPanel = new JPanel(new EqualsLayout(
35 EqualsLayout.HORIZONTAL, EqualsLayout.RIGHT, 1));
36 buttonPanel.add(cancelButton);
37 buttonPanel.add(okButton);
38 buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5));
39 buttonPanel.setOpaque(false);
40 }
41
42 }