1 7 8 package com.memoire.vainstall.builder.util; 9 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 25 public class ProductStepsNode extends AbstractVAIProductNode { 26 27 JPanel panel = null; 28 29 private final static Border loweredBorder = new SoftBevelBorder(BevelBorder.LOWERED); 30 31 JPopupMenu menu; 32 33 public ProductStepsNode() { 34 super(); 35 } 36 37 public String getName() { 38 return "Steps"; 39 } 40 41 public JPanel getUI() { 42 if (panel == null) { 43 panel = new JPanel(); 44 panel.setBorder(loweredBorder); 45 46 JLabel label = new JLabel(); 47 label.setText("<html><b><font color=black size=3><center>Required step during install can be defined here.</center></font></b></html>"); 48 panel.add(label); 49 } 50 51 return panel; 52 } 53 54 public String getTitle() { 55 return "Installation Steps"; 56 } 57 58 public ImageIcon getIcon() { 59 return new javax.swing.ImageIcon (getClass().getResource("/com/memoire/vainstall/builder/images/New16.gif")); 60 } 61 62 public void start() { 63 } 65 66 public void stop() { 67 } 69 70 public void save() { 71 } 72 73 77 public JPopupMenu getPopupMenu() { 78 79 if(getModel().getRequiredList().get("Required Steps") == null) { 80 return null; 81 } 82 83 if(menu == null) { 85 menu = new JPopupMenu(); 86 87 JMenuItem item = new JMenuItem("Add Required Steps"); 88 item.addActionListener(getActionFor("ProductAddRequiredStepsAction")); 89 menu.add(item); 90 } 91 92 return menu; 93 } 94 95 } 96 | Popular Tags |