01: /**
02: * $RCSfile: XuiWelcomePanel.java,v $
03: * @creation 01/02/00
04: * @modification $Date: 2005/03/30 19:42:57 $
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.VAGlobals;
11: import com.memoire.vainstall.VAWelcomeStep;
12:
13: /**
14: * Based on mode 'Graphic' by Axel von Arnim.
15: * @version $Id: XuiWelcomePanel.java,v 1.6 2005/03/30 19:42:57 deniger Exp $
16: * @author Guillaume Desnoix
17: */
18:
19: public class XuiWelcomePanel extends XuiAbstractPanel implements
20: VAWelcomeStep {
21: public XuiWelcomePanel() {
22: super ();
23:
24: setLayout(new BorderLayout());
25:
26: JPanel pnMain = new XuiPanel();
27: pnMain.setLayout(new BorderLayout());
28: pnMain.setBorder(new EmptyBorder(5, 5, 5, 5));
29: pnMain.setForeground(new Color(128, 255, 255));
30:
31: /*
32: JLabel lbTitle=new XuiLabel(VAGlobals.APP_NAME+" "+VAGlobals.APP_VERSION);
33: lbTitle.setForeground(Color.black);
34: lbTitle.setFont(new Font("SansSerif", Font.BOLD, 24));
35: lbTitle.setHorizontalAlignment(JLabel.CENTER);
36: */
37:
38: XuiTitle lbProg;
39: if (VAGlobals.APP_VERSION != null)
40: lbProg = new XuiTitle(VAGlobals.APP_NAME + " "
41: + VAGlobals.APP_VERSION);
42: else
43: lbProg = new XuiTitle(VAGlobals.APP_NAME + " (no version)");
44:
45: String s;
46: switch (VAGlobals.OPERATION) {
47: case VAGlobals.INSTALL:
48: s = VAGlobals.i18n("UI_Installation");
49: break;
50: case VAGlobals.UPDATE:
51: s = VAGlobals.i18n("UI_Update");
52: break;
53: case VAGlobals.UNINSTALL:
54: s = VAGlobals.i18n("UI_Uninstallation");
55: break;
56: default:
57: s = "";
58: break;
59: }
60: XuiTitle lbTitle = new XuiTitle(VAGlobals
61: .i18n("VAWelcomePanel_Welcome")
62: + " : " + s, XuiTitle.LEFT);
63: lbTitle.setFont(new Font("SansSerif", Font.PLAIN, 16));
64:
65: pnMain.add(BorderLayout.NORTH, lbTitle);
66: pnMain.add(BorderLayout.CENTER, lbProg);
67: pnMain.add(BorderLayout.SOUTH, new XuiLabel(VAGlobals
68: .i18n("UI_ClickNextToStart")));
69:
70: JPanel pnImage = XuiImagePanel.IMAGE_PANEL;
71: add(pnImage, BorderLayout.WEST);
72: add(pnMain, BorderLayout.CENTER);
73: }
74: }
|