01: /**
02: * $RCSfile: XuiShortcutPanel.java,v $
03: * @creation 02/04/00
04: * @modification $Date: 2001/06/08 10:03:04 $
05: */package com.memoire.vainstall.xui;
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: XuiShortcutPanel.java,v 1.4 2001/06/08 10:03:04 vonarnim Exp $
15: * @author Guillaume Desnoix
16: */
17:
18: public class XuiShortcutPanel extends XuiAbstractPanel implements
19: VAShortcutStep {
20: JRadioButton rdYes_, rdNo_;
21:
22: public XuiShortcutPanel() {
23: super ();
24:
25: setLayout(new BorderLayout(5, 0));
26: setBorder(new EmptyBorder(5, 5, 5, 5));
27: setForeground(new Color(128, 255, 255));
28:
29: JPanel pnMain = new XuiPanel();
30: pnMain.setLayout(new BorderLayout());
31: pnMain.setOpaque(false);
32:
33: XuiTitle lbTitle = new XuiTitle(VAGlobals.i18n("UI_Shortcuts"),
34: XuiTitle.LEFT);
35: lbTitle.setFont(new Font("SansSerif", Font.PLAIN, 16));
36:
37: /*
38: setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
39: JPanel pnMain=new JPanel();
40: pnMain.setBorder
41: (new CompoundBorder(new EtchedBorder(),
42: new EmptyBorder(new Insets(5, 5, 5, 5))));
43: pnMain.setLayout(new BorderLayout());
44: JLabel lbTitle=new JLabel(VAGlobals.getString("Shortcuts"));
45: lbTitle.setFont(lbTitle.getFont().deriveFont(20));
46: */
47:
48: JPanel pnChoice = new XuiPanel();
49: pnChoice.setOpaque(false);
50: pnChoice.setLayout(new BorderLayout(5, 5));
51: pnChoice.add(BorderLayout.WEST, new XuiLabel(VAGlobals
52: .i18n("UI_WantShortcutsCreated")));
53: JPanel pnRadios = new XuiPanel();
54: pnRadios.setOpaque(false);
55: rdYes_ = new XuiRadioButton(VAGlobals.i18n("Common_Yes"));
56: rdYes_.setSelected(true);
57: rdNo_ = new XuiRadioButton(VAGlobals.i18n("Common_No"));
58: rdNo_.setSelected(false);
59: ButtonGroup bg = new ButtonGroup();
60: bg.add(rdYes_);
61: bg.add(rdNo_);
62: pnRadios.add(rdYes_);
63: pnRadios.add(rdNo_);
64: pnChoice.add(BorderLayout.CENTER, pnRadios);
65:
66: pnMain.add(BorderLayout.NORTH, lbTitle);
67: pnMain.add(BorderLayout.SOUTH, pnChoice);
68:
69: // JPanel pnImage=XuiImagePanel.IMAGE_PANEL;
70: // pnMain.setPreferredSize(new Dimension(200, pnImage.getPreferredSize().height));
71: // add(pnImage);
72:
73: add(pnMain, BorderLayout.CENTER);
74: }
75:
76: public boolean isShortcutAccepted() {
77: return rdYes_.isSelected();
78: }
79: }
|