home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
ActionBeanInfo.java
< prev
next >
Wrap
Text File
|
1998-09-18
|
2KB
|
70 lines
package com.symantec.itools.swing.actions;
import java.beans.*;
import java.util.ResourceBundle;
import com.symantec.itools.vcafe.beans.BeanDescriptorAttributes;
import com.symantec.itools.swing.DesignTimeResourceBundle;
//import com.symantec.itools.vcafe.openapi.beans.DesignTimeDnd;
//import com.symantec.itools.vcafe.openapi.beans.DesignTimeOnDrop;
public final class ActionBeanInfo
extends com.symantec.itools.beans.HelperBeanInfo
{
public ActionBeanInfo()
{
ResourceBundle resources = ResourceBundle.getBundle("com.symantec.itools.swing.DesignTimeResourceBundle");
setComponentLibraryFolder(resources.getString(DesignTimeResourceBundle.ACTIONS_FOLDER_KEY));
set16x16ColorIconName("Action.gif");
}
protected Class getBeanClass()
{
return Action.class;
}
protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
{
super.modifyBeanDescriptor(beanDescriptor);
//???RKM??? This does not work yet, take it out for the beta
/*
try
{
Class dtHelper;
// this is currently locaed in symclass.zip...
dtHelper = Class.forName("com.symantec.itools.swing.actions.ActionDTHelper");
// NO NO NO NO - use reflection!
// beanDescriptor.setValue(DesignTimeDnd.DESIGNTIME_DND_ATTRIBUTE, dtHelper);
// beanDescriptor.setValue(DesignTimeOnDrop.DESIGNTIME_ON_DROP_ATTRIBUTE, dtHelper);
}
catch(ClassNotFoundException ex)
{
}
*/
beanDescriptor.setValue(BeanDescriptorAttributes.ABSTRACT_BEAN_ATTRIBUTE, Boolean.TRUE);
beanDescriptor.setValue("WINHELP", winHelpID);
beanDescriptor.setValue
("ROOTTEMPLATE",
"import java.awt.*;\n" +
"import com.sun.java.swing.*;\n" +
"\n" +
"public class Action1 extends com.symantec.itools.swing.actions.Action\n" +
"{\n" +
"\tpublic void actionPerformed(java.awt.event.ActionEvent e)\n" +
"\t{\n" +
"\t\t// Add code here to do your custom action\n" +
"\t}\n" +
"}\n"
);
}
protected final static String winHelpID = "0x6012C";
}