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


Java IntegerEditor類代碼示例

本文整理匯總了Java中sun.beans.editors.IntegerEditor的典型用法代碼示例。如果您正苦於以下問題:Java IntegerEditor類的具體用法?Java IntegerEditor怎麽用?Java IntegerEditor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: PropertyEditorFinder

import sun.beans.editors.IntegerEditor; //導入依賴的package包/類
public PropertyEditorFinder() {
    super(PropertyEditor.class, false, "Editor", "sun.beans.editors");

    this.registry = new WeakCache<Class<?>, Class<?>>();
    this.registry.put(Byte.TYPE, ByteEditor.class);
    this.registry.put(Short.TYPE, ShortEditor.class);
    this.registry.put(Integer.TYPE, IntegerEditor.class);
    this.registry.put(Long.TYPE, LongEditor.class);
    this.registry.put(Boolean.TYPE, BooleanEditor.class);
    this.registry.put(Float.TYPE, FloatEditor.class);
    this.registry.put(Double.TYPE, DoubleEditor.class);
}
 
開發者ID:openjdk,項目名稱:jdk7-jdk,代碼行數:13,代碼來源:PropertyEditorFinder.java

示例2: run

import sun.beans.editors.IntegerEditor; //導入依賴的package包/類
public void run() {
    if (this.passed) {
        SunToolkit.createNewAppContext();
    }
    PropertyEditorManager.registerEditor(ThirdBean.class, ThirdBeanEditor.class);

    test(FirstBean.class, FirstBeanEditor.class);
    test(SecondBean.class, null);
    test(ThirdBean.class, ThirdBeanEditor.class);
    // test editors for default primitive types
    test(Byte.TYPE, ByteEditor.class);
    test(Short.TYPE, ShortEditor.class);
    test(Integer.TYPE, IntegerEditor.class);
    test(Long.TYPE, LongEditor.class);
    test(Boolean.TYPE, BooleanEditor.class);
    test(Float.TYPE, FloatEditor.class);
    test(Double.TYPE, DoubleEditor.class);
    // test editors for default object types
    test(Byte.class, ByteEditor.class);
    test(Short.class, ShortEditor.class);
    test(Integer.class, IntegerEditor.class);
    test(Long.class, LongEditor.class);
    test(Boolean.class, BooleanEditor.class);
    test(Float.class, FloatEditor.class);
    test(Double.class, DoubleEditor.class);
    test(String.class, StringEditor.class);
    test(Color.class, ColorEditor.class);
    test(Font.class, FontEditor.class);
    test(Enumeration.class, EnumEditor.class);

    PropertyEditorManager.registerEditor(ThirdBean.class, null);
    PropertyEditorManager.setEditorSearchPath(SEARCH_PATH);

    test(FirstBean.class, FirstBeanEditor.class);
    test(SecondBean.class, SecondBeanEditor.class);
    test(ThirdBean.class, ThirdBeanEditor.class);
    // test editors for default primitive types
    test(Byte.TYPE, ByteEditor.class);
    test(Short.TYPE, ShortEditor.class);
    test(Integer.TYPE, IntegerEditor.class);
    test(Long.TYPE, LongEditor.class);
    test(Boolean.TYPE, BooleanEditor.class);
    test(Float.TYPE, FloatEditor.class);
    test(Double.TYPE, DoubleEditor.class);
    // test editors for default object types
    test(Byte.class, null);
    test(Short.class, null);
    test(Integer.class, null);
    test(Long.class, null);
    test(Boolean.class, null);
    test(Float.class, null);
    test(Double.class, null);
    test(String.class, null);
    test(Color.class, null);
    test(Font.class, null);
    test(Enumeration.class, EnumEditor.class);

    this.passed = true;
}
 
開發者ID:openjdk,項目名稱:jdk7-jdk,代碼行數:60,代碼來源:TestPropertyEditor.java


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