home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JComponentBeanInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  5.3 KB  |  58 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Image;
  4. import java.beans.BeanDescriptor;
  5. import java.beans.PropertyDescriptor;
  6. import java.beans.SimpleBeanInfo;
  7. import javax.swing.beaninfo.SwingBeanInfo;
  8.  
  9. public class JComponentBeanInfo extends SwingBeanInfo {
  10.    private static final Class classJComponent;
  11.    // $FF: synthetic field
  12.    static Class class$javax$swing$JComponent;
  13.  
  14.    static {
  15.       classJComponent = class$javax$swing$JComponent != null ? class$javax$swing$JComponent : (class$javax$swing$JComponent = class$("javax.swing.JComponent"));
  16.    }
  17.  
  18.    // $FF: synthetic method
  19.    static Class class$(String var0) {
  20.       try {
  21.          return Class.forName(var0);
  22.       } catch (ClassNotFoundException var2) {
  23.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  24.       }
  25.    }
  26.  
  27.    private PropertyDescriptor createPropertyDescriptor(String var1, Object[] var2) {
  28.       return super.createPropertyDescriptor(classJComponent, var1, var2);
  29.    }
  30.  
  31.    public BeanDescriptor getBeanDescriptor() {
  32.       return ((SwingBeanInfo)this).createBeanDescriptor(classJComponent, new Object[]{"preferred", Boolean.TRUE, "shortDescription", "JComponent"});
  33.    }
  34.  
  35.    public Image getIcon(int var1) {
  36.       switch (var1) {
  37.          case 1:
  38.             Image var5 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor16.gif");
  39.             return var5 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor16.gif") : var5;
  40.          case 2:
  41.             Image var4 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor32.gif");
  42.             return var4 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor32.gif") : var4;
  43.          case 3:
  44.             Image var3 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono16.gif");
  45.             return var3 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono16.gif") : var3;
  46.          case 4:
  47.             Image var2 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono32.gif");
  48.             return var2 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono32.gif") : var2;
  49.          default:
  50.             return super.getIcon(var1);
  51.       }
  52.    }
  53.  
  54.    public PropertyDescriptor[] getPropertyDescriptors() {
  55.       return new PropertyDescriptor[]{this.createPropertyDescriptor("focusCycleRoot", new Object[]{"shortDescription", "focusCycleRoot"}), this.createPropertyDescriptor("UIClassID", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "UIClassID"}), this.createPropertyDescriptor("toolTipText", new Object[]{"bound", Boolean.FALSE, "preferred", Boolean.TRUE, "shortDescription", "The text to display in a tool tip."}), this.createPropertyDescriptor("doubleBuffered", new Object[]{"shortDescription", "doubleBuffered"}), this.createPropertyDescriptor("width", new Object[]{"shortDescription", "width"}), this.createPropertyDescriptor("preferredSize", new Object[]{"bound", Boolean.TRUE, "preferred", Boolean.TRUE, "shortDescription", "The preferred size of the component."}), this.createPropertyDescriptor("accessibleContext", new Object[]{"shortDescription", "accessibleContext"}), this.createPropertyDescriptor("opaque", new Object[]{"shortDescription", "opaque"}), this.createPropertyDescriptor("maximumSize", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The maximum size of the component."}), this.createPropertyDescriptor("autoscrolls", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "Whether this component automatically scrolls its contents when dragged."}), this.createPropertyDescriptor("alignmentY", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The preferred vertical alignment of the component"}), this.createPropertyDescriptor("border", new Object[]{"bound", Boolean.TRUE, "preferred", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The component's border."}), this.createPropertyDescriptor("alignmentX", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The preferred horizontal alignment of the component"}), this.createPropertyDescriptor("rootPane", new Object[]{"shortDescription", "rootPane"}), this.createPropertyDescriptor("insets", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "insets"}), this.createPropertyDescriptor("graphics", new Object[]{"shortDescription", "graphics"}), this.createPropertyDescriptor("debugGraphicsOptions", new Object[]{"bound", Boolean.FALSE, "preferred", Boolean.TRUE, "shortDescription", "Diagnostic options for graphics operations."}), this.createPropertyDescriptor("optimizedDrawingEnabled", new Object[]{"shortDescription", "optimizedDrawingEnabled"}), this.createPropertyDescriptor("nextFocusableComponent", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "The next component to get focus after this one."}), this.createPropertyDescriptor("validateRoot", new Object[]{"shortDescription", "validateRoot"}), this.createPropertyDescriptor("focusTraversable", new Object[]{"shortDescription", "focusTraversable"}), this.createPropertyDescriptor("height", new Object[]{"shortDescription", "height"}), this.createPropertyDescriptor("minimumSize", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The minimum size of the component."}), this.createPropertyDescriptor("managingFocus", new Object[]{"shortDescription", "managingFocus"}), this.createPropertyDescriptor("registeredKeyStrokes", new Object[]{"shortDescription", "registeredKeyStrokes"}), this.createPropertyDescriptor("visibleRect", new Object[]{"shortDescription", "visibleRect"}), this.createPropertyDescriptor("y", new Object[]{"shortDescription", "y"}), this.createPropertyDescriptor("x", new Object[]{"shortDescription", "x"}), this.createPropertyDescriptor("requestFocusEnabled", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "Whether the component can obtain the focus by calling requestFocus."}), this.createPropertyDescriptor("topLevelAncestor", new Object[]{"shortDescription", "topLevelAncestor"}), this.createPropertyDescriptor("paintingTile", new Object[]{"shortDescription", "paintingTile"})};
  56.    }
  57. }
  58.