1 19 20 package org.netbeans.modules.form.beaninfo.swing; 21 22 import java.beans.*; 23 import java.awt.FlowLayout ; 24 25 public class FlowLayoutBeanInfo extends BISupport { 26 27 public FlowLayoutBeanInfo() { 28 super("flowLayout", java.awt.FlowLayout .class); } 30 31 protected PropertyDescriptor[] createPropertyDescriptors() throws IntrospectionException { 32 PropertyDescriptor[] pds = new PropertyDescriptor[] { 33 createRW(FlowLayout .class, "alignment"), createRW(FlowLayout .class, "hgap"), createRW(FlowLayout .class, "vgap"), }; 37 pds[0].setPropertyEditorClass(AlignmentPropertyEditor.class); 38 return pds; 39 } 40 41 42 43 public static class AlignmentPropertyEditor extends BISupport.TaggedPropertyEditor { 44 public AlignmentPropertyEditor() { 45 super( 46 new int[] { 47 FlowLayout.CENTER, 48 FlowLayout.LEFT, 49 FlowLayout.RIGHT 50 }, 51 new String [] { 52 "java.awt.FlowLayout.CENTER", "java.awt.FlowLayout.LEFT", "java.awt.FlowLayout.RIGHT" }, 56 new String [] { 57 "VALUE_AlignmentCenter", "VALUE_AlignmentLeft", "VALUE_AlignmentRight", } 61 ); 62 } 63 } 64 65 } 66 | Popular Tags |