What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.javacvs.commands;
import java.beans.*;
import org.netbeans.modules.javacvs.customizers.TagParamInput;
import org.openide.util.*;
public class CvsTag$TagImplBeanInfo extends SimpleBeanInfo {
private int defaultPropertyIndex = -1;
private int defaultEventIndex = -1;
public BeanInfo[] getAdditionalBeanInfo () {
/* try {
return new BeanInfo[] { Introspector.getBeanInfo (FileSystemCommand.class) };
} catch (IntrospectionException ie) {
org.openide.ErrorManager.getDefault().notify(ie);
return null;
}
*/
return null;
}
/**
* Gets the bean's BeanDescriptor s.
*
* @return BeanDescriptor describing the editable
* properties of this bean. May return null if the
* information should be obtained by automatic analysis.
*/
public BeanDescriptor getBeanDescriptor() {
BeanDescriptor bd = new BeanDescriptor (CvsTag.TagImpl.class, TagParamInput.class);
bd.setDisplayName(NbBundle.getMessage (CvsTag.class, "CvsTag.BeanName")); // NOI18N
return bd;
}
/**
* Gets the bean's PropertyDescriptor s.
*
* @return An array of PropertyDescriptors describing the editable
* properties supported by this bean. May return null if the
* information should be obtained by automatic analysis.
*
* If a property is indexed, then its entry in the result array will
* belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
* A client of getPropertyDescriptors can use "instanceof" to check
* if a given PropertyDescriptor is an IndexedPropertyDescriptor.
*/
public PropertyDescriptor[] getPropertyDescriptors() {
try {
PropertyDescriptor tagByRevision = new PropertyDescriptor ("tagByRevision", CvsTag.TagImpl.class); // NOI18N
tagByRevision.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_tagByRevision")); // NOI18N
tagByRevision.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_tagByRevision")); // NOI18N
PropertyDescriptor tagByDate = new PropertyDescriptor ("tagByDate", CvsTag.TagImpl.class); // NOI18N
tagByDate.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_tagByDate")); // NOI18N
tagByDate.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_tagByDate")); // NOI18N
PropertyDescriptor recursive = new PropertyDescriptor ("recursive", CvsTag.TagImpl.class); // NOI18N
recursive.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_recursive")); // NOI18N
recursive.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_recursive")); //NOI18N
PropertyDescriptor checkThatUnmodified = new PropertyDescriptor ("checkThatUnmodified", CvsTag.TagImpl.class); //NOI18N
checkThatUnmodified.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_checkThatUnmodified")); //NOI18N
checkThatUnmodified.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_checkThatUnmodified")); //NOI18N
PropertyDescriptor deleteTag = new PropertyDescriptor ("deleteTag", CvsTag.TagImpl.class); //NOI18N
deleteTag.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_deleteTag")); //NOI18N
deleteTag.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_deleteTag")); //NOI18N
PropertyDescriptor makeBranchTag = new PropertyDescriptor ("makeBranchTag", CvsTag.TagImpl.class); //NOI18N
makeBranchTag.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_makeBranchTag")); //NOI18N
makeBranchTag.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_makeBranchTag")); //NOI18N
PropertyDescriptor overrideExistingTag = new PropertyDescriptor ("overrideExistingTag", CvsTag.TagImpl.class); //NOI18N
overrideExistingTag.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_overrideExistingTag")); //NOI18N
overrideExistingTag.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_overrideExistingTag")); //NOI18N
PropertyDescriptor tag = new PropertyDescriptor ("tag", CvsTag.TagImpl.class); //NOI18N
tag.setDisplayName (NbBundle.getMessage (CvsTag.class, "PROP_tag")); //NOI18N
tag.setShortDescription (NbBundle.getMessage (CvsTag.class, "HINT_tag")); //NOI18N
return new PropertyDescriptor[] {tagByRevision, tagByDate, tag, overrideExistingTag,
makeBranchTag, deleteTag, checkThatUnmodified, recursive};
} catch (IntrospectionException ie) {
org.openide.ErrorManager.getDefault().notify(ie);
return null;
}
}
/**
* Gets the bean's EventSetDescriptor s.
*
* @return An array of EventSetDescriptors describing the kinds of
* events fired by this bean. May return null if the information
* should be obtained by automatic analysis.
*/
public EventSetDescriptor[] getEventSetDescriptors() {
return null;
}
/**
* Gets the bean's MethodDescriptor s.
*
* @return An array of MethodDescriptors describing the methods
* implemented by this bean. May return null if the information
* should be obtained by automatic analysis.
*/
public MethodDescriptor[] getMethodDescriptors() {
return null;
}
/**
* A bean may have a "default" property that is the property that will
* mostly commonly be initially chosen for update by human's who are
* customizing the bean.
* @return Index of default property in the PropertyDescriptor array
* returned by getPropertyDescriptors.
* Returns -1 if there is no default property.
*/
public int getDefaultPropertyIndex() {
return 2; //tag property
}
/**
* A bean may have a "default" event that is the event that will
* mostly commonly be used by human's when using the bean.
* @return Index of default event in the EventSetDescriptor array
* returned by getEventSetDescriptors.
* Returns -1 if there is no default event.
*/
public int getDefaultEventIndex() {
return defaultEventIndex;
}
}
|