1 19 20 package org.netbeans.modules.form.palette; 21 22 import javax.swing.AbstractAction ; 23 import javax.swing.Action ; 24 25 import org.netbeans.modules.form.project.ClassSource; 26 import org.netbeans.spi.palette.PaletteActions; 27 28 32 public class FormPaletteActions extends PaletteActions { 33 34 35 public FormPaletteActions() { 36 } 37 38 public Action [] getImportActions() { 39 40 Action [] res = new Action [3]; 41 42 res[0] = new AbstractAction ( PaletteUtils.getBundleString("CTL_AddJAR_Button") ) { public void actionPerformed(java.awt.event.ActionEvent e) { 44 BeanInstaller.installBeans(ClassSource.JAR_SOURCE); 45 } 46 }; 47 res[0].putValue( Action.LONG_DESCRIPTION, 48 PaletteUtils.getBundleString("ACSD_AddJAR_Button") ); 50 res[1] = new AbstractAction ( PaletteUtils.getBundleString("CTL_AddLibrary_Button") ) { public void actionPerformed(java.awt.event.ActionEvent e) { 52 BeanInstaller.installBeans(ClassSource.LIBRARY_SOURCE); 53 } 54 }; 55 res[1].putValue( Action.LONG_DESCRIPTION, 56 PaletteUtils.getBundleString("ACSD_AddLibrary_Button") ); 58 res[2] = new AbstractAction ( PaletteUtils.getBundleString("CTL_AddProject_Button") ) { public void actionPerformed(java.awt.event.ActionEvent e) { 60 BeanInstaller.installBeans(ClassSource.PROJECT_SOURCE); 61 } 62 }; 63 res[2].putValue( Action.LONG_DESCRIPTION, 64 PaletteUtils.getBundleString("ACSD_AddProject_Button") ); 66 return res; 67 } 68 69 public Action [] getCustomCategoryActions(org.openide.util.Lookup category) { 70 return new Action [0]; } 72 73 public Action [] getCustomItemActions(org.openide.util.Lookup item) { 74 return new Action [0]; } 76 77 public Action [] getCustomPaletteActions() { 78 return new Action [0]; } 80 81 public Action getPreferredAction(org.openide.util.Lookup item) { 82 return null; } 84 } 85 | Popular Tags |