KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > memoire > vainstall > builder > gui > ProductStepEndPanel


1 /*
2  * $RCSfile: ProductStepEndPanel.java,v $
3  * @modification $Date: 2001/09/28 19:35:30 $
4  * @version $Id: ProductStepEndPanel.java,v 1.1 2001/09/28 19:35:30 hfalk Exp $
5  *
6  */

7
8 package com.memoire.vainstall.builder.gui;
9
10 import com.memoire.vainstall.VAGlobals;
11 import com.memoire.vainstall.builder.*;
12
13 import java.awt.*;
14 import java.awt.event.*;
15
16 import javax.swing.*;
17 import javax.swing.border.*;
18
19 /**
20  * This panel is shown in the product dialog
21  *
22  * This is not just a view panel because it has a reference to the
23  * VAIProductModel.
24  *
25  *
26  * @see com.memoire.vainstall.builder.gui.VAIProductInternalFrame
27  * @see javax.swing.JPanel
28  *
29  * @author Henrik Falk
30  * @version $Id: ProductStepEndPanel.java,v 1.1 2001/09/28 19:35:30 hfalk Exp $
31  */

32 public class ProductStepEndPanel extends JPanel {
33
34     private VAIProductModel model;
35
36     private final static Border loweredBorder = new SoftBevelBorder(BevelBorder.LOWERED);
37
38     public ProductStepEndPanel() {
39
40         setBorder(loweredBorder);
41
42         GridBagLayout layout = new GridBagLayout();
43         setLayout(layout);
44
45         GridBagConstraints contraint=new GridBagConstraints();
46
47         // Description
48
JLabel decriptionLabel = new JLabel();
49         decriptionLabel.setBorder(BorderFactory.createTitledBorder("Description"));
50         decriptionLabel.setText("This is the End panel.");
51         contraint.fill = GridBagConstraints.BOTH;
52         contraint.insets = new Insets(16,16,0,16);
53         contraint.anchor = GridBagConstraints.WEST;
54         contraint.gridx = 0;
55         contraint.gridy = 0;
56         contraint.gridwidth = 2;
57         contraint.gridheight = 1;
58         contraint.weightx = 1;
59         contraint.weighty = 0;
60         layout.setConstraints(decriptionLabel,contraint);
61         add(decriptionLabel);
62
63
64         JPanel fillPanel = new JPanel();
65         contraint.fill = GridBagConstraints.BOTH;
66         contraint.insets = new Insets(4,4,4,4);
67         contraint.anchor = GridBagConstraints.CENTER;
68         contraint.gridx = 0;
69         contraint.gridy = 2;
70         contraint.gridwidth = 1;
71         contraint.gridheight = 1;
72         contraint.weightx = 0;
73         contraint.weighty = 1;
74         layout.setConstraints(fillPanel,contraint);
75         add(fillPanel);
76
77     }
78
79
80     /**
81      * save
82      */

83     public void save() {
84     }
85
86     /**
87      * initialize the panel
88      */

89     public void initialize(VAIProductModel model) {
90         this.model = model;
91
92     }
93
94     /**
95      * stop
96      */

97     public void stop() {
98     }
99
100 }
101
Popular Tags