BeanInstance.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:autoweka 作者:
/**
  * Adds all beans to the supplied component
  *
  * @param container a <code>JComponent</code> value
  */
 public static void addAllBeansToContainer(JComponent container, Integer... tab) {
   int index = 0;
   if (tab.length > 0) {
     index = tab[0].intValue();
   }

   Vector components = null;
   if (TABBED_COMPONENTS.size() > 0 && index < TABBED_COMPONENTS.size()) {
     components = TABBED_COMPONENTS.get(index);
   }

   if (container != null) {
     if (components != null) {
for (int i = 0; i < components.size(); i++) {
  BeanInstance tempInstance = (BeanInstance)components.elementAt(i);
  Object tempBean = tempInstance.getBean();
  if (Beans.isInstanceOf(tempBean, JComponent.class)) {
    container.add((JComponent)tempBean);
  }
}
     }
     container.revalidate();
   }
 }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号