001: /*
002: * $RCSfile: ProductStepUpgradePanel.java,v $
003: * @modification $Date: 2001/09/28 19:35:30 $
004: * @version $Id: ProductStepUpgradePanel.java,v 1.1 2001/09/28 19:35:30 hfalk Exp $
005: *
006: */
007:
008: package com.memoire.vainstall.builder.gui;
009:
010: import com.memoire.vainstall.VAGlobals;
011: import com.memoire.vainstall.builder.*;
012:
013: import java.awt.*;
014: import java.awt.event.*;
015:
016: import javax.swing.*;
017: import javax.swing.border.*;
018:
019: /**
020: * This panel is shown in the product dialog
021: *
022: * This is not just a view panel because it has a reference to the
023: * VAIProductModel.
024: *
025: *
026: * @see com.memoire.vainstall.builder.gui.VAIProductInternalFrame
027: * @see javax.swing.JPanel
028: *
029: * @author Henrik Falk
030: * @version $Id: ProductStepUpgradePanel.java,v 1.1 2001/09/28 19:35:30 hfalk Exp $
031: */
032: public class ProductStepUpgradePanel extends JPanel {
033:
034: private VAIProductModel model;
035:
036: private final static Border loweredBorder = new SoftBevelBorder(
037: BevelBorder.LOWERED);
038:
039: JTextField installFileNameField;
040:
041: public ProductStepUpgradePanel() {
042:
043: setBorder(loweredBorder);
044:
045: GridBagLayout layout = new GridBagLayout();
046: setLayout(layout);
047:
048: GridBagConstraints contraint = new GridBagConstraints();
049:
050: // Description
051: JLabel decriptionLabel = new JLabel();
052: decriptionLabel.setBorder(BorderFactory
053: .createTitledBorder("Description"));
054: decriptionLabel.setText("This step shows a upgrade panel.");
055: contraint.fill = GridBagConstraints.BOTH;
056: contraint.insets = new Insets(16, 16, 0, 16);
057: contraint.anchor = GridBagConstraints.WEST;
058: contraint.gridx = 0;
059: contraint.gridy = 0;
060: contraint.gridwidth = 1;
061: contraint.gridheight = 1;
062: contraint.weightx = 1;
063: contraint.weighty = 0;
064: layout.setConstraints(decriptionLabel, contraint);
065: add(decriptionLabel);
066: /*
067: // Title
068: JLabel titleLabel = new JLabel();
069: titleLabel.setText("Filename of generated package:");
070: contraint.fill = GridBagConstraints.BOTH;
071: contraint.insets = new Insets(16,16,0,16);
072: contraint.anchor = GridBagConstraints.WEST;
073: contraint.gridx = 0;
074: contraint.gridy = 1;
075: contraint.gridwidth = 1;
076: contraint.gridheight = 1;
077: contraint.weightx = 0;
078: contraint.weighty = 0;
079: layout.setConstraints(titleLabel,contraint);
080: add(titleLabel);
081:
082: installFileNameField = new JTextField();
083: contraint.fill=GridBagConstraints.HORIZONTAL;
084: contraint.insets=new Insets(16,16,0,16);
085: contraint.anchor=GridBagConstraints.CENTER;
086: contraint.gridx=1;
087: contraint.gridy=0;
088: contraint.gridwidth=1;
089: contraint.gridheight=1;
090: contraint.weightx=1;
091: contraint.weighty=0;
092: layout.setConstraints(installFileNameField,contraint);
093: add(installFileNameField);
094: */
095:
096: JPanel fillPanel = new JPanel();
097: contraint.fill = GridBagConstraints.BOTH;
098: contraint.insets = new Insets(4, 4, 4, 4);
099: contraint.anchor = GridBagConstraints.CENTER;
100: contraint.gridx = 0;
101: contraint.gridy = 2;
102: contraint.gridwidth = 1;
103: contraint.gridheight = 1;
104: contraint.weightx = 0;
105: contraint.weighty = 1;
106: layout.setConstraints(fillPanel, contraint);
107: add(fillPanel);
108:
109: }
110:
111: /**
112: * save
113: */
114: public void save() {
115: }
116:
117: /**
118: * initialize the panel
119: */
120: public void initialize(VAIProductModel model) {
121: this .model = model;
122: }
123:
124: /**
125: * stop
126: */
127: public void stop() {
128: }
129:
130: }
|