當前位置: 首頁>>代碼示例>>Java>>正文


Java Beans.isInstanceOf方法代碼示例

本文整理匯總了Java中java.beans.Beans.isInstanceOf方法的典型用法代碼示例。如果您正苦於以下問題:Java Beans.isInstanceOf方法的具體用法?Java Beans.isInstanceOf怎麽用?Java Beans.isInstanceOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.Beans的用法示例。


在下文中一共展示了Beans.isInstanceOf方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addAllBeansToContainer

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * 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<Object> 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();
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:31,代碼來源:BeanInstance.java

示例2: addBeanInstances

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Adds the supplied collection of beans to the end of the list of collections
 * and to the JComponent container (if not null)
 * 
 * @param beanInstances the vector of bean instances to add
 * @param container
 */
public static void addBeanInstances(Vector<Object> beanInstances,
  JComponent container) {
  // reset(container);

  if (container != null) {
    for (int i = 0; i < beanInstances.size(); i++) {
      Object bean = ((BeanInstance) beanInstances.elementAt(i)).getBean();
      if (Beans.isInstanceOf(bean, JComponent.class)) {
        container.add((JComponent) bean);
      }
    }
    container.revalidate();
    container.repaint();
  }

  TABBED_COMPONENTS.add(beanInstances);
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:25,代碼來源:BeanInstance.java

示例3: appendBeans

import java.beans.Beans; //導入方法依賴的package包/類
public static void appendBeans(JComponent container, Vector<Object> beans,
  int tab) {
  if (TABBED_COMPONENTS.size() > 0 && tab < TABBED_COMPONENTS.size()) {
    Vector<Object> components = TABBED_COMPONENTS.get(tab);
    //

    for (int i = 0; i < beans.size(); i++) {
      components.add(beans.get(i));
      if (container != null) {
        Object bean = ((BeanInstance) beans.elementAt(i)).getBean();
        if (Beans.isInstanceOf(bean, JComponent.class)) {
          container.add((JComponent) bean);
        }
      }
    }

    if (container != null) {
      container.revalidate();
      container.repaint();
    }
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:23,代碼來源:BeanInstance.java

示例4: addAllBeansToContainer

import java.beans.Beans; //導入方法依賴的package包/類
/**
  * 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();
   }
 }
 
開發者ID:dsibournemouth,項目名稱:autoweka,代碼行數:30,代碼來源:BeanInstance.java

示例5: addBeanInstances

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Adds the supplied collection of beans to the end of the list
 * of collections and to the JComponent container (if not null)
 * 
 * @param beanInstances the vector of bean instances to add
 * @param container
 */
public static void addBeanInstances(Vector beanInstances, JComponent container) {
  // reset(container);
  
  if (container != null) {
    for (int i = 0; i < beanInstances.size(); i++) {
      Object bean = ((BeanInstance)beanInstances.elementAt(i)).getBean();
      if (Beans.isInstanceOf(bean, JComponent.class)) {
        container.add((JComponent)bean);
      }
    }
    container.revalidate();
    container.repaint();
  }
  
  TABBED_COMPONENTS.add(beanInstances);    
}
 
開發者ID:dsibournemouth,項目名稱:autoweka,代碼行數:24,代碼來源:BeanInstance.java

示例6: appendBeans

import java.beans.Beans; //導入方法依賴的package包/類
public static void appendBeans(JComponent container, Vector beans, int tab) {
  if (TABBED_COMPONENTS.size() > 0 && tab < TABBED_COMPONENTS.size()) {
    Vector components = TABBED_COMPONENTS.get(tab);
    //
    
    for (int i = 0; i < beans.size(); i++) {
      components.add(beans.get(i));
      if (container != null) {
        Object bean = ((BeanInstance)beans.elementAt(i)).getBean();
        if (Beans.isInstanceOf(bean, JComponent.class)) {
          container.add((JComponent)bean);
        }
      }        
    }
    
    if (container != null) {
      container.revalidate();
      container.repaint();
    }      
  }
}
 
開發者ID:dsibournemouth,項目名稱:autoweka,代碼行數:22,代碼來源:BeanInstance.java

示例7: setBeanInstances

import java.beans.Beans; //導入方法依賴的package包/類
/**
  * Describe <code>setBeanInstances</code> method here.
  *
  * @param beanInstances a <code>Vector</code> value
  * @param container a <code>JComponent</code> value
  */
 public static void setBeanInstances(Vector beanInstances, 
			      JComponent container) {
   reset(container);
   
   if (container != null) {
     for (int i = 0; i < beanInstances.size(); i++) {
Object bean = ((BeanInstance)beanInstances.elementAt(i)).getBean();
if (Beans.isInstanceOf(bean, JComponent.class)) {
  container.add((JComponent)bean);
}
     }
     container.revalidate();
     container.repaint();
   }
   COMPONENTS = beanInstances;
 }
 
開發者ID:williamClanton,項目名稱:jbossBA,代碼行數:23,代碼來源:BeanInstance.java

示例8: removeAllBeansFromContainer

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Removes all beans from containing component
 * 
 * @param container a <code>JComponent</code> value
 */
public static void removeAllBeansFromContainer(JComponent container,
  Integer... tab) {

  int index = 0;
  if (tab.length > 0) {
    index = tab[0].intValue();
  }

  Vector<Object> 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++) {
        Object tempInstance = components.elementAt(i);
        Object tempBean = ((BeanInstance) tempInstance).getBean();
        if (Beans.isInstanceOf(tempBean, JComponent.class)) {
          container.remove((JComponent) tempBean);
        }
      }
    }
    container.revalidate();
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:32,代碼來源:BeanInstance.java

示例9: setBeanInstances

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Adds the supplied collection of beans at the supplied index in the list of
 * collections. If the index is not supplied then the primary collection is
 * set (i.e. index 0). Also adds the beans to the supplied JComponent
 * container (if not null)
 * 
 * @param beanInstances a <code>Vector</code> value
 * @param container a <code>JComponent</code> value
 */
public static void setBeanInstances(Vector<Object> beanInstances,
  JComponent container, Integer... tab) {
  removeAllBeansFromContainer(container, tab);

  if (container != null) {
    for (int i = 0; i < beanInstances.size(); i++) {
      Object bean = ((BeanInstance) beanInstances.elementAt(i)).getBean();
      if (Beans.isInstanceOf(bean, JComponent.class)) {
        container.add((JComponent) bean);
      }
    }
    container.revalidate();
    container.repaint();
  }

  int index = 0;
  if (tab.length > 0) {
    index = tab[0].intValue();
  }

  if (index < TABBED_COMPONENTS.size()) {
    TABBED_COMPONENTS.set(index, beanInstances);
  }

  // COMPONENTS = beanInstances;
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:36,代碼來源:BeanInstance.java

示例10: removeAllBeansFromContainer

import java.beans.Beans; //導入方法依賴的package包/類
/**
  * Removes all beans from containing component
  *
  * @param container a <code>JComponent</code> value
  */
 public static void removeAllBeansFromContainer(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.remove((JComponent)tempBean);
  }
}
     }
     container.revalidate();
   }    
 }
 
開發者ID:dsibournemouth,項目名稱:autoweka,代碼行數:32,代碼來源:BeanInstance.java

示例11: setBeanInstances

import java.beans.Beans; //導入方法依賴的package包/類
/**
  * Adds the supplied collection of beans at the supplied index in
  * the list of collections. If the index is not supplied then
  * the primary collection is set (i.e. index 0). Also adds
  * the beans to the supplied JComponent container (if not null)
  *
  * @param beanInstances a <code>Vector</code> value
  * @param container a <code>JComponent</code> value
  */
 public static void setBeanInstances(Vector beanInstances, 
			      JComponent container, 
			      Integer... tab) {
   removeAllBeansFromContainer(container, tab);
   
   if (container != null) {
     for (int i = 0; i < beanInstances.size(); i++) {
Object bean = ((BeanInstance)beanInstances.elementAt(i)).getBean();
if (Beans.isInstanceOf(bean, JComponent.class)) {
  container.add((JComponent)bean);
}
     }
     container.revalidate();
     container.repaint();
   }
   
   int index = 0;
   if (tab.length > 0) {
     index = tab[0].intValue();
   }
   
   if (index < TABBED_COMPONENTS.size()) {
     TABBED_COMPONENTS.set(index, beanInstances);
   }
   
   // COMPONENTS = beanInstances;
 }
 
開發者ID:dsibournemouth,項目名稱:autoweka,代碼行數:37,代碼來源:BeanInstance.java

示例12: checkType

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Checks the type of an element matches the underlying list type.
 */
private void checkType(Object element) {
    if (element != null) {
        if (!Beans.isInstanceOf(element, listObjectType)) {
            throw new RuntimeException("element is not of correct type.");
        }
    }
}
 
開發者ID:VU-libtech,項目名稱:OLE-INST,代碼行數:11,代碼來源:PurApArrayList.java

示例13: testIsInstanceOf_BeanNull

import java.beans.Beans; //導入方法依賴的package包/類
public void testIsInstanceOf_BeanNull() {
    try {
        Beans.isInstanceOf(null, Serializable.class);
        fail("Should throw NullPointerException.");
    } catch (NullPointerException e) {
    }
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:8,代碼來源:BeansTest.java

示例14: removeAllBeansFromContainer

import java.beans.Beans; //導入方法依賴的package包/類
/**
  * Removes all beans from containing component
  *
  * @param container a <code>JComponent</code> value
  */
 public static void removeAllBeansFromContainer(JComponent container) {
   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.remove((JComponent)tempBean);
  }
}
     }
     container.revalidate();
   }
 }
 
開發者ID:williamClanton,項目名稱:jbossBA,代碼行數:20,代碼來源:BeanInstance.java

示例15: addAllBeansToContainer

import java.beans.Beans; //導入方法依賴的package包/類
/**
  * Adds all beans to the supplied component
  *
  * @param container a <code>JComponent</code> value
  */
 public static void addAllBeansToContainer(JComponent container) {
   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();
   }
 }
 
開發者ID:williamClanton,項目名稱:jbossBA,代碼行數:20,代碼來源:BeanInstance.java


注:本文中的java.beans.Beans.isInstanceOf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。