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


Java FontEditor類代碼示例

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


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

示例1: run

import sun.beans.editors.FontEditor; //導入依賴的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.FontEditor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。