01: /**
02: * $RCSfile: VAShortcutPanel.java,v $
03: * @creation 02/04/00
04: * @modification $Date: 2001/06/08 10:03:04 $
05: */package com.memoire.vainstall.gui;
06:
07: import java.awt.*;
08: import javax.swing.*;
09: import javax.swing.border.*;
10: import com.memoire.vainstall.VAShortcutStep;
11: import com.memoire.vainstall.VAGlobals;
12:
13: /**
14: * @version $Id: VAShortcutPanel.java,v 1.4 2001/06/08 10:03:04 vonarnim Exp $
15: * @author Axel von Arnim
16: */
17:
18: public class VAShortcutPanel extends VAPanel implements VAShortcutStep {
19: JRadioButton rdYes_, rdNo_;
20:
21: public VAShortcutPanel() {
22: super ();
23:
24: setLayout(new BoxLayout(this , BoxLayout.X_AXIS));
25: JPanel pnMain = new JPanel();
26: pnMain.setBorder(new CompoundBorder(new EtchedBorder(),
27: new EmptyBorder(new Insets(5, 5, 5, 5))));
28: pnMain.setLayout(new BoxLayout(pnMain, BoxLayout.Y_AXIS));
29:
30: JPanel pnHaut = new JPanel();
31: pnHaut.setLayout(new BorderLayout());
32: JPanel pnBas = new JPanel();
33: pnBas.setLayout(new BorderLayout());
34:
35: JLabel lbTitle = new JLabel(VAGlobals.i18n("UI_Shortcuts"));
36: lbTitle.setFont(lbTitle.getFont().deriveFont(Font.BOLD, 20));
37: lbTitle.setOpaque(true);
38: lbTitle.setBorder(new EmptyBorder(new Insets(5, 0, 5, 0)));
39: lbTitle.setBackground(pnMain.getBackground().darker());
40: lbTitle.setForeground(Color.white);
41:
42: JPanel pnRadios = new JPanel();
43: rdYes_ = new JRadioButton(VAGlobals.i18n("Common_Yes"));
44: rdYes_.setSelected(true);
45: rdNo_ = new JRadioButton(VAGlobals.i18n("Common_No"));
46: rdNo_.setSelected(false);
47: ButtonGroup bg = new ButtonGroup();
48: bg.add(rdYes_);
49: bg.add(rdNo_);
50: pnRadios.add(rdYes_);
51: pnRadios.add(rdNo_);
52:
53: pnHaut.add(BorderLayout.NORTH, lbTitle);
54: JLabel lbQuest = new JLabel(VAGlobals
55: .i18n("UI_WantShortcutsCreated"));
56: lbQuest.setHorizontalAlignment(JLabel.CENTER);
57: pnHaut.add(BorderLayout.SOUTH, lbQuest);
58: pnBas.add(BorderLayout.NORTH, pnRadios);
59: pnMain.add(pnHaut);
60: pnMain.add(pnBas);
61:
62: JComponent pnImage = VAImagePanel.IMAGE_PANEL;
63: add(pnImage);
64: add(pnMain);
65: }
66:
67: public boolean isShortcutAccepted() {
68: return rdYes_.isSelected();
69: }
70: }
|