| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.plaf.basic.BasicHTML
public class BasicHTML
支持为 swing 组件提供 html 视图。它将简单的 html 字符串转换为 javax.swing.text.View 实现,它能呈现 html 并提供必需的布局语义。
| 字段摘要 | |
|---|---|
| static String | documentBaseKey存储为客户端属性以指示用作解析相关引用的基址的键。 | 
| static String | propertyKey存储为 JComponent 的客户端属性时用于 html 渲染器的键。 | 
| 构造方法摘要 | |
|---|---|
| BasicHTML() | |
| 方法摘要 | |
|---|---|
| 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 的客户端属性中。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 字段详细信息 | 
|---|
public static final String propertyKey
public static final String documentBaseKey
   jComponent.putClientProperty(documentBaseKey,
                                xxx.class.getResource("resources/"));
 
| 构造方法详细信息 | 
|---|
public BasicHTML()
| 方法详细信息 | 
|---|
public static View createHTMLView(JComponent c,
                                  String html)
public static int getHTMLBaseline(View view,
                                  int w,
                                  int h)
view - 为其获取基线的视图w - 为其获取基线的宽度h - 为其获取基线的高度
IllegalArgumentException - 如果宽度或高度 < 0FontMetrics, 
JComponent.getBaseline(int,int)public static boolean isHTMLString(String s)
public static void updateRenderer(JComponent c,
                                  String text)
此方法对于静态(即共享)ComponentUI 实现十分有用,可以完全从 JComponent 中获取其状态。
| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。