01: /*
02: * $RCSfile: ProductUpdateNode.java,v $
03: * @modification $Date: 2001/09/28 19:41:42 $
04: * @version $Id: ProductUpdateNode.java,v 1.1 2001/09/28 19:41:42 hfalk Exp $
05: *
06: */
07:
08: package com.memoire.vainstall.builder.util;
09:
10: import com.memoire.vainstall.VAGlobals;
11:
12: import java.awt.*;
13: import javax.swing.*;
14: import javax.swing.border.*;
15: import javax.swing.tree.*;
16:
17: /**
18: * This is
19: *
20: * @see
21: *
22: * @author Henrik Falk
23: * @version $Id: ProductUpdateNode.java,v 1.1 2001/09/28 19:41:42 hfalk Exp $
24: */
25: public class ProductUpdateNode extends AbstractVAIProductNode {
26:
27: JPanel panel = null;
28:
29: private final static Border loweredBorder = new SoftBevelBorder(
30: BevelBorder.LOWERED);
31:
32: JPopupMenu menu;
33:
34: public ProductUpdateNode() {
35: super ();
36: }
37:
38: public String getName() {
39: return "Update";
40: }
41:
42: public JPanel getUI() {
43: if (panel == null) {
44: panel = new JPanel();
45: panel.setBorder(loweredBorder);
46:
47: JLabel label = new JLabel();
48: label
49: .setText("<html><b><font color=black size=3><center>The install package.</center></font></b></html>");
50: panel.add(label);
51: }
52:
53: return panel;
54: }
55:
56: public String getTitle() {
57: return "Update Package";
58: }
59:
60: public ImageIcon getIcon() {
61: return new javax.swing.ImageIcon(getClass().getResource(
62: "/com/memoire/vainstall/builder/images/New16.gif"));
63: }
64:
65: public void start() {
66: // ((JPanel)getUI()).initialize(getModel());
67: }
68:
69: public void stop() {
70: // ((JPanel)getUI()).stop();
71: }
72:
73: public void save() {
74: }
75:
76: /**
77: * This method is hardwired for the current version of VAInstall
78: * which only accept hardcoded steps.
79: */
80: public JPopupMenu getPopupMenu() {
81: /*
82: if(getModel().getRequiredList().get("Required Steps") == null) {
83: return null;
84: }
85:
86: // construct the menu
87: if(menu == null) {
88: menu = new JPopupMenu();
89:
90: JMenuItem item = new JMenuItem("Add Required Steps");
91: item.addActionListener(getActionFor("ProductAddRequiredStepsAction"));
92: menu.add(item);
93: }
94: */
95: return null;
96: }
97:
98: }
|