📄 tabpanelbeaninfo.java
字号:
package com.magelang.tabsplitter;
/**
* The bean information class for com.magelang.tabsplitter.TabPanel.
*
* <p>Use this code at your own risk! MageLang Institute is not
* responsible for any damage caused directly or indirectly through
* use of this code.
* <p><p>
* <b>SOFTWARE RIGHTS</b>
* <p>
* TabSplitter, version 2.0, Scott Stanchfield, MageLang Institute
* <p>
* We reserve no legal rights to this code--it is fully in the
* public domain. An individual or company may do whatever
* they wish with source code distributed with it, including
* including the incorporation of it into commerical software.
*
* <p>However, this code <i>cannot</i> be sold as a standalone product.
* <p>
* We encourage users to develop software with this code. However,
* we do ask that credit is given to us for developing it
* By "credit", we mean that if you use these components or
* incorporate any source code into one of your programs
* (commercial product, research project, or otherwise) that
* you acknowledge this fact somewhere in the documentation,
* research report, etc... If you like these components and have
* developed a nice tool with the output, please mention that
* you developed it using these components. In addition, we ask that
* the headers remain intact in our source code. As long as these
* guidelines are kept, we expect to continue enhancing this
* system and expect to make other tools available as they are
* completed.
* <p>
* The MageLang Support Classes Gang:
* @version TabSplitter 2.0, MageLang Insitute, Jan 18, 1998
* @author <a href="http:www.scruz.net/~thetick">Scott Stanchfield</a>, <a href=http://www.MageLang.com>MageLang Institute</a>
*/
public class TabPanelBeanInfo extends java.beans.SimpleBeanInfo {
/**
* Gets the actionPerformed(java.awt.event.ActionEvent) method descriptor.
* @return java.beans.MethodDescriptor
*/
public java.beans.MethodDescriptor actionPerformed_javaawteventActionEventMethodDescriptor() {
java.beans.MethodDescriptor aDescriptor = null;
try {
/* Create and return the actionPerformed(java.awt.event.ActionEvent) method descriptor. */
java.lang.reflect.Method aMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aParameterTypes[] = {
java.awt.event.ActionEvent.class
};
aMethod = getBeanClass().getMethod("actionPerformed", aParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aMethod = findMethod(getBeanClass(), "actionPerformed", 1);
};
try {
/* Try creating the method descriptor with parameter descriptors. */
java.beans.ParameterDescriptor aParameterDescriptor1 = new java.beans.ParameterDescriptor();
aParameterDescriptor1.setName("arg1");
aParameterDescriptor1.setDisplayName("e");
java.beans.ParameterDescriptor aParameterDescriptors[] = {
aParameterDescriptor1
};
aDescriptor = new java.beans.MethodDescriptor(aMethod, aParameterDescriptors);
} catch (Throwable exception) {
/* Try creating the method descriptor without parameter descriptors. */
handleException(exception);
aDescriptor = new java.beans.MethodDescriptor(aMethod);
};
/* aDescriptor.setDisplayName("actionPerformed(java"); */
aDescriptor.setShortDescription("actionPerformed(java.awt.event.ActionEvent)");
/* aDescriptor.setExpert(false); */
/* aDescriptor.setHidden(false); */
} catch (Throwable exception) {
handleException(exception);
};
return aDescriptor;
}
/**
* Gets the addTabSelectionListener(com.magelang.tabsplitter.TabSelectionListener) method descriptor.
* @return java.beans.MethodDescriptor
*/
public java.beans.MethodDescriptor addTabSelectionListener_commagelangtabsplitterTabSelectionListenerMethodDescriptor() {
java.beans.MethodDescriptor aDescriptor = null;
try {
/* Create and return the addTabSelectionListener(com.magelang.tabsplitter.TabSelectionListener) method descriptor. */
java.lang.reflect.Method aMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aParameterTypes[] = {
com.magelang.tabsplitter.TabSelectionListener.class
};
aMethod = getBeanClass().getMethod("addTabSelectionListener", aParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aMethod = findMethod(getBeanClass(), "addTabSelectionListener", 1);
};
try {
/* Try creating the method descriptor with parameter descriptors. */
java.beans.ParameterDescriptor aParameterDescriptor1 = new java.beans.ParameterDescriptor();
aParameterDescriptor1.setName("arg1");
aParameterDescriptor1.setDisplayName("newListener");
java.beans.ParameterDescriptor aParameterDescriptors[] = {
aParameterDescriptor1
};
aDescriptor = new java.beans.MethodDescriptor(aMethod, aParameterDescriptors);
} catch (Throwable exception) {
/* Try creating the method descriptor without parameter descriptors. */
handleException(exception);
aDescriptor = new java.beans.MethodDescriptor(aMethod);
};
/* aDescriptor.setDisplayName("addTabSelectionListener(com"); */
aDescriptor.setShortDescription("addTabSelectionListener(com.magelang.tabsplitter.TabSelectionListener)");
/* aDescriptor.setExpert(false); */
/* aDescriptor.setHidden(false); */
} catch (Throwable exception) {
handleException(exception);
};
return aDescriptor;
}
/**
* Gets the borderColor property descriptor.
* @return java.beans.PropertyDescriptor
*/
public java.beans.PropertyDescriptor borderColorPropertyDescriptor() {
java.beans.PropertyDescriptor aDescriptor = null;
try {
try {
/* Using methods via getMethod is the faster way to create the borderColor property descriptor. */
java.lang.reflect.Method aGetMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aGetMethodParameterTypes[] = {};
aGetMethod = getBeanClass().getMethod("getBorderColor", aGetMethodParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aGetMethod = findMethod(getBeanClass(), "getBorderColor", 0);
};
java.lang.reflect.Method aSetMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aSetMethodParameterTypes[] = {
java.awt.Color.class
};
aSetMethod = getBeanClass().getMethod("setBorderColor", aSetMethodParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aSetMethod = findMethod(getBeanClass(), "setBorderColor", 1);
};
aDescriptor = new java.beans.PropertyDescriptor("borderColor"
, aGetMethod, aSetMethod);
} catch (Throwable exception) {
/* Since we failed using methods, try creating a default property descriptor. */
handleException(exception);
aDescriptor = new java.beans.PropertyDescriptor("borderColor"
, getBeanClass());
};
/* aDescriptor.setBound(false); */
/* aDescriptor.setConstrained(false); */
/* aDescriptor.setDisplayName("borderColor"); */
/* aDescriptor.setShortDescription("borderColor"); */
/* aDescriptor.setExpert(false); */
/* aDescriptor.setHidden(false); */
} catch (Throwable exception) {
handleException(exception);
};
return aDescriptor;
}
/**
* Gets the determineTabText() method descriptor.
* @return java.beans.MethodDescriptor
*/
public java.beans.MethodDescriptor determineTabTextMethodDescriptor() {
java.beans.MethodDescriptor aDescriptor = null;
try {
/* Create and return the determineTabText() method descriptor. */
java.lang.reflect.Method aMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aParameterTypes[] = {};
aMethod = getBeanClass().getMethod("determineTabText", aParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aMethod = findMethod(getBeanClass(), "determineTabText", 0);
};
try {
/* Try creating the method descriptor with parameter descriptors. */
java.beans.ParameterDescriptor aParameterDescriptors[] = {};
aDescriptor = new java.beans.MethodDescriptor(aMethod, aParameterDescriptors);
} catch (Throwable exception) {
/* Try creating the method descriptor without parameter descriptors. */
handleException(exception);
aDescriptor = new java.beans.MethodDescriptor(aMethod);
};
/* aDescriptor.setDisplayName("determineTabText()"); */
/* aDescriptor.setShortDescription("determineTabText()"); */
/* aDescriptor.setExpert(false); */
/* aDescriptor.setHidden(false); */
} catch (Throwable exception) {
handleException(exception);
};
return aDescriptor;
}
/**
* Find the method by comparing (name & parameter size) against the methods in the class.
* @return java.lang.reflect.Method
* @param aClass java.lang.Class
* @param methodName java.lang.String
* @param parameterCount int
*/
public static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String methodName, int parameterCount) {
try {
/* Since this method attempts to find a method by getting all methods from the class, */
/* this method should only be called if getMethod can not find the method. */
java.lang.reflect.Method methods[] = aClass.getMethods();
for (int index = 0; index < methods.length; index++){
java.lang.reflect.Method method = methods[index];
if ((method.getParameterTypes().length == parameterCount) && (method.getName().equals(methodName))) {
return method;
};
};
} catch (java.lang.Throwable exception) {
return null;
};
return null;
}
/**
* Gets the firstVisible property descriptor.
* @return java.beans.PropertyDescriptor
*/
public java.beans.PropertyDescriptor firstVisiblePropertyDescriptor() {
java.beans.PropertyDescriptor aDescriptor = null;
try {
try {
/* Using methods via getMethod is the faster way to create the firstVisible property descriptor. */
java.lang.reflect.Method aGetMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aGetMethodParameterTypes[] = {};
aGetMethod = getBeanClass().getMethod("getFirstVisible", aGetMethodParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aGetMethod = findMethod(getBeanClass(), "getFirstVisible", 0);
};
java.lang.reflect.Method aSetMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aSetMethodParameterTypes[] = {
int.class
};
aSetMethod = getBeanClass().getMethod("setFirstVisible", aSetMethodParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aSetMethod = findMethod(getBeanClass(), "setFirstVisible", 1);
};
aDescriptor = new java.beans.PropertyDescriptor("firstVisible"
, aGetMethod, aSetMethod);
} catch (Throwable exception) {
/* Since we failed using methods, try creating a default property descriptor. */
handleException(exception);
aDescriptor = new java.beans.PropertyDescriptor("firstVisible"
, getBeanClass());
};
/* aDescriptor.setBound(false); */
/* aDescriptor.setConstrained(false); */
/* aDescriptor.setDisplayName("firstVisible"); */
/* aDescriptor.setShortDescription("firstVisible"); */
/* aDescriptor.setExpert(false); */
/* aDescriptor.setHidden(false); */
} catch (Throwable exception) {
handleException(exception);
};
return aDescriptor;
}
/**
* Gets the font property descriptor.
* @return java.beans.PropertyDescriptor
*/
public java.beans.PropertyDescriptor fontPropertyDescriptor() {
java.beans.PropertyDescriptor aDescriptor = null;
try {
try {
/* Using methods via getMethod is the faster way to create the font property descriptor. */
java.lang.reflect.Method aGetMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aGetMethodParameterTypes[] = {};
aGetMethod = getBeanClass().getMethod("getFont", aGetMethodParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aGetMethod = findMethod(getBeanClass(), "getFont", 0);
};
java.lang.reflect.Method aSetMethod = null;
try {
/* Attempt to find the method using getMethod with parameter types. */
java.lang.Class aSetMethodParameterTypes[] = {
java.awt.Font.class
};
aSetMethod = getBeanClass().getMethod("setFont", aSetMethodParameterTypes);
} catch (Throwable exception) {
/* Since getMethod failed, call findMethod. */
handleException(exception);
aSetMethod = findMethod(getBeanClass(), "setFont", 1);
};
aDescriptor = new java.beans.PropertyDescriptor("font"
, aGetMethod, aSetMethod);
} catch (Throwable exception) {
/* Since we failed using methods, try creating a default property descriptor. */
handleException(exception);
aDescriptor = new java.beans.PropertyDescriptor("font"
, getBeanClass());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -