public class BasicHTML extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static String | documentBaseKey
              密钥存储为客户端属性,以指示相对引用被解析的基础。 
             | 
| static String | propertyKey
              作为JComponent的客户端属性存储时,用于html渲染器的键。 
             | 
| Constructor and Description | 
|---|
| BasicHTML() | 
| Modifier and Type | Method and Description | 
|---|---|
| static View | createHTMLView(JComponent c, String html)
              为给定的组件和html的字符串创建一个html渲染器。 
             | 
| static int | getHTMLBaseline(View view, int w, int h)
              返回html渲染器的基线。 
             | 
| static boolean | isHTMLString(String s)
              检查给定的字符串,看看它是否应该在支持html呈现的非文本组件中触发html渲染逻辑。 
             | 
| static void | updateRenderer(JComponent c, String text)
              将给定文本的HTML渲染存储到给定JComponent的客户端属性中。 
             | 
public static final String propertyKey
public static final String documentBaseKey
  jComponent.putClientProperty(documentBaseKey,
                                xxx.class.getResource("resources/"));  
          public static View createHTMLView(JComponent c, String html)
public static int getHTMLBaseline(View view, int w, int h)
view - 获取基准的视图 
           w - 获取基准的宽度 
           h - 获得基准的高度 
           IllegalArgumentException - 如果宽度或高度<0 
           FontMetrics , JComponent.getBaseline(int,int) 
           public static boolean isHTMLString(String s)
public static void updateRenderer(JComponent c, String text)
该方法对于静态(即共享)并且完全从JComponent获取状态的ComponentUI实现是有用的。
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.