001: package com.nexes.test;
002:
003: import javax.swing.*;
004: import javax.swing.border.*;
005: import java.awt.*;
006: import java.awt.event.*;
007:
008: import com.nexes.wizard.*;
009:
010: public class TestPanel3 extends JPanel {
011:
012: private JLabel anotherBlankSpace;
013: private JLabel blankSpace;
014: private ButtonGroup connectorGroup;
015: private JLabel jLabel1;
016: private JPanel jPanel1;
017: private JLabel progressDescription;
018: private JProgressBar progressSent;
019: private JLabel welcomeTitle;
020: private JLabel yetAnotherBlankSpace1;
021:
022: private JPanel contentPanel;
023: private JLabel iconLabel;
024: private JSeparator separator;
025: private JLabel textLabel;
026: private JPanel titlePanel;
027:
028: public TestPanel3() {
029:
030: super ();
031:
032: contentPanel = getContentPanel();
033: ImageIcon icon = getImageIcon();
034:
035: titlePanel = new javax.swing.JPanel();
036: textLabel = new javax.swing.JLabel();
037: iconLabel = new javax.swing.JLabel();
038: separator = new javax.swing.JSeparator();
039:
040: setLayout(new java.awt.BorderLayout());
041:
042: titlePanel.setLayout(new java.awt.BorderLayout());
043: titlePanel.setBackground(Color.gray);
044:
045: textLabel.setBackground(Color.gray);
046: textLabel.setFont(new Font("MS Sans Serif", Font.BOLD, 14));
047: textLabel.setText("Pretending To Connect To Server");
048: textLabel
049: .setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
050: textLabel.setOpaque(true);
051:
052: iconLabel.setBackground(Color.gray);
053: if (icon != null)
054: iconLabel.setIcon(icon);
055:
056: titlePanel.add(textLabel, BorderLayout.CENTER);
057: titlePanel.add(iconLabel, BorderLayout.EAST);
058: titlePanel.add(separator, BorderLayout.SOUTH);
059:
060: add(titlePanel, BorderLayout.NORTH);
061: JPanel secondaryPanel = new JPanel();
062: secondaryPanel.add(contentPanel, BorderLayout.NORTH);
063: add(secondaryPanel, BorderLayout.WEST);
064:
065: }
066:
067: public void setProgressText(String s) {
068: progressDescription.setText(s);
069: }
070:
071: public void setProgressValue(int i) {
072: progressSent.setValue(i);
073: }
074:
075: private JPanel getContentPanel() {
076:
077: JPanel contentPanel1 = new JPanel();
078:
079: connectorGroup = new ButtonGroup();
080: welcomeTitle = new JLabel();
081: jPanel1 = new JPanel();
082: blankSpace = new JLabel();
083: progressSent = new JProgressBar();
084: progressDescription = new JLabel();
085: anotherBlankSpace = new JLabel();
086: yetAnotherBlankSpace1 = new JLabel();
087: jLabel1 = new JLabel();
088:
089: contentPanel1.setLayout(new java.awt.BorderLayout());
090:
091: welcomeTitle
092: .setText("Now we will pretend to send this data somewhere for approval...");
093: contentPanel1.add(welcomeTitle, java.awt.BorderLayout.NORTH);
094:
095: jPanel1.setLayout(new java.awt.GridLayout(0, 1));
096:
097: jPanel1.add(blankSpace);
098:
099: progressSent.setStringPainted(true);
100: jPanel1.add(progressSent);
101:
102: progressDescription.setFont(new java.awt.Font("MS Sans Serif",
103: 1, 11));
104: progressDescription.setText("Connecting to Server...");
105: jPanel1.add(progressDescription);
106:
107: jPanel1.add(anotherBlankSpace);
108:
109: jPanel1.add(yetAnotherBlankSpace1);
110:
111: contentPanel1.add(jPanel1, java.awt.BorderLayout.CENTER);
112:
113: jLabel1
114: .setText("After the sending is completed, the Back and Finish buttons will enable below.");
115: contentPanel1.add(jLabel1, java.awt.BorderLayout.SOUTH);
116:
117: return contentPanel1;
118: }
119:
120: private ImageIcon getImageIcon() {
121: return null;
122: }
123:
124: }
|