Search in sources :

Example 1 with BeanDescriptor

use of java.beans.BeanDescriptor in project ACS by ACS-Community.

the class AcceptorBeanBeanInfo method getBeanDescriptorLazy.

protected BeanDescriptor getBeanDescriptorLazy() {
    BeanDescriptor bd = new BeanDescriptor(AcceptorBean.class);
    BeanTagger.addActions(bd, new String[] { "cern.gp.actions.AcceptAction" });
    return bd;
}
Also used : BeanDescriptor(java.beans.BeanDescriptor)

Example 2 with BeanDescriptor

use of java.beans.BeanDescriptor in project ACS by ACS-Community.

the class BeanTagger method addActions.

/**
   * Adds classes of available actions to this BeanInfo. If the BeanInfo already 
   * defines some actions the existing ones and the new ones are merged together.
   * @param actionClasses an array of the class of available action(s)
   */
public static void addActions(BeanInfo beanInfo, String[] actions) {
    BeanDescriptor descriptor = beanInfo.getBeanDescriptor();
    if (descriptor == null)
        return;
    addActions(descriptor, actions);
}
Also used : BeanDescriptor(java.beans.BeanDescriptor)

Example 3 with BeanDescriptor

use of java.beans.BeanDescriptor in project jdk8u_jdk by JetBrains.

the class Foo method getBeanDescriptor.

public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(Foo.class);
    // set a value to ensure that it's unique
    bd.setValue("test", Boolean.TRUE);
    return bd;
}
Also used : BeanDescriptor(java.beans.BeanDescriptor)

Example 4 with BeanDescriptor

use of java.beans.BeanDescriptor in project jdk8u_jdk by JetBrains.

the class WombatBeanInfo method getBeanDescriptor.

public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(Wombat.class);
    // set a value to ensure that it's unique
    bd.setValue("test", Boolean.TRUE);
    return bd;
}
Also used : BeanDescriptor(java.beans.BeanDescriptor)

Example 5 with BeanDescriptor

use of java.beans.BeanDescriptor in project jmeter by apache.

the class TestBeanGUI method getMenuCategories.

/** {@inheritDoc} */
@Override
public Collection<String> getMenuCategories() {
    List<String> menuCategories = new LinkedList<>();
    BeanDescriptor bd = beanInfo.getBeanDescriptor();
    // in expert mode:
    if (bd.isExpert() && !JMeterUtils.isExpertMode()) {
        return null;
    }
    int matches = setupGuiClasses(menuCategories);
    if (matches == 0) {
        log.error("Could not assign GUI class to {}", testBeanClass);
    } else if (matches > 1) {
        // may be impossible, but no harm in
        // checking ...
        log.error("More than 1 GUI class found for {}", testBeanClass);
    }
    return menuCategories;
}
Also used : BeanDescriptor(java.beans.BeanDescriptor) LinkedList(java.util.LinkedList)

Aggregations

BeanDescriptor (java.beans.BeanDescriptor)25 BeanInfo (java.beans.BeanInfo)10 SimpleBeanInfo (java.beans.SimpleBeanInfo)8 FakeFox01BeanInfo (org.apache.harmony.beans.tests.support.mock.FakeFox01BeanInfo)8 PropertyDescriptor (java.beans.PropertyDescriptor)6 IndexedPropertyDescriptor (java.beans.IndexedPropertyDescriptor)5 MethodDescriptor (java.beans.MethodDescriptor)4 MockJavaBean (org.apache.harmony.beans.tests.support.mock.MockJavaBean)3 EventSetDescriptor (java.beans.EventSetDescriptor)2 IntrospectionException (java.beans.IntrospectionException)2 Method (java.lang.reflect.Method)2 ArrayList (java.util.ArrayList)2 KeyEvent (java.awt.event.KeyEvent)1 KeyListener (java.awt.event.KeyListener)1 FeatureDescriptor (java.beans.FeatureDescriptor)1 IndexedPropertyChangeEvent (java.beans.IndexedPropertyChangeEvent)1 ParameterDescriptor (java.beans.ParameterDescriptor)1 PropertyChangeEvent (java.beans.PropertyChangeEvent)1 Enumeration (java.util.Enumeration)1 LinkedList (java.util.LinkedList)1