fontbeaninfo.java

来自「一个简单的visio程序。」· Java 代码 · 共 66 行

JAVA
66
字号
package HAB.object;

import java.beans.*;

public class fontBeanInfo extends SimpleBeanInfo  implements java.io.Serializable{
	private void writeObject(java.io.ObjectOutputStream s)
				      throws java.io.IOException 
    {
         s.defaultWriteObject();
    }

    private void readObject(java.io.ObjectInputStream s)
	      throws java.lang.ClassNotFoundException,
		     java.io.IOException 
    {
        s.defaultReadObject();
    }

    public PropertyDescriptor[] getPropertyDescriptors() {
        try {
            PropertyDescriptor bold =
				new PropertyDescriptor("Bold", beanClass,"_getBold","_setBold");
            PropertyDescriptor italic =
				new PropertyDescriptor("Italic", beanClass,"_getItalic","_setItalic");
            PropertyDescriptor name =
	            new PropertyDescriptor("Name", beanClass,"_getName","_setName");
            PropertyDescriptor Deft =
	            new PropertyDescriptor("Deft", beanClass,"_getDeft","_setDeft");
            PropertyDescriptor size =
		        new PropertyDescriptor("Size", beanClass,"_getSize","_setSize");
            PropertyDescriptor strikethrough =
			    new PropertyDescriptor("Strikethrough", beanClass,"_getStrikethrough","_setStrikethrough");
            PropertyDescriptor underline =
				new PropertyDescriptor("Underline", beanClass,"_getUnderline","_setUnderline");
            PropertyDescriptor weight =
				new PropertyDescriptor("Weight", beanClass,"_getWeight","_setWeight");
            PropertyDescriptor charset =
				new PropertyDescriptor("Charset", beanClass,"_getCharset","_setCharset");
            PropertyDescriptor style =
				new PropertyDescriptor("Style", beanClass,"_getStyle","_setStyle");

            PropertyDescriptor pd[] = {name,Deft, bold, italic, size, strikethrough, underline, weight,charset,style};
            return pd;
        } catch (IntrospectionException e) {
            throw new Error(e.toString());
        }
    }
    
	public int getDefaultPropertyIndex() {
        return 0;
    }
	
    public MethodDescriptor[] getMethodDescriptors() {
 
	  
      MethodDescriptor rv[] = new MethodDescriptor[0];
	   
      return rv;
	  
    }


    private final static Class beanClass = HAB.object.font.class;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?