接口的使用
javax.swing.text.MutableAttributeSet
使用 MutableAttributeSet 的包
包
描述
提供一组“轻量级”(全 Java 语言)组件,尽可能在所有平台上以相同的方式工作。
提供处理可编辑和不可编辑文本组件的类和接口。
提供用于创建 HTML 文本编辑器的类
HTMLEditorKit 和支持类。
-
MutableAttributeSet 在 javax.swing 中的用法
javax.swing 中返回 MutableAttributeSet 的方法 -
MutableAttributeSet 在 javax.swing.text 中的用法
修饰符和类型类描述class实现元素的抽象部分。class实现包含其他元素的复合元素。class实现直接表示某种内容的元素。protected class文档的默认根元素...映射出包含的段落/行。class使用哈希表的 MutableAttributeSet 的直接实现。class属性的集合,通常用于表示字符和段落样式。javax.swing.text 中返回 MutableAttributeSet 的方法修饰符和类型方法描述protected MutableAttributeSetStyleContext.createLargeAttributeSet(AttributeSet a) 创建大量应该以空间换取时间的属性。StyledEditorKit.getInputAttributes()获取窗格的输入属性。javax.swing.text 中的方法,参数类型为 MutableAttributeSet修饰符和类型方法描述protected voidStyledEditorKit.createInputAttributes(Element element, MutableAttributeSet set) 将elements AttributeSet 中的键/值复制到set中。voidStyleContext.readAttributes(ObjectInputStream in, MutableAttributeSet a) 读取属性的上下文特定处理static voidStyleContext.readAttributeSet(ObjectInputStream in, MutableAttributeSet a) 从给定的对象输入流中读取一组属性,这些属性先前已用writeAttributeSet写出。static voidStyleConstants.setAlignment(MutableAttributeSet a, int align) 设置对齐方式。static voidStyleConstants.setBackground(MutableAttributeSet a, Color fg) 设置背景颜色。static voidStyleConstants.setBidiLevel(MutableAttributeSet a, int o) 设置双向级别。static voidStyleConstants.setBold(MutableAttributeSet a, boolean b) 设置粗体属性。static voidStyleConstants.setComponent(MutableAttributeSet a, Component c) 设置组件属性。static voidStyleConstants.setFirstLineIndent(MutableAttributeSet a, float i) 设置首行缩进。static voidStyleConstants.setFontFamily(MutableAttributeSet a, String fam) 设置字体属性。static voidStyleConstants.setFontSize(MutableAttributeSet a, int s) 设置字体大小属性。static voidStyleConstants.setForeground(MutableAttributeSet a, Color fg) 设置前景色。static voidStyleConstants.setIcon(MutableAttributeSet a, Icon c) 设置图标属性。static voidStyleConstants.setItalic(MutableAttributeSet a, boolean b) 设置斜体属性。static voidStyleConstants.setLeftIndent(MutableAttributeSet a, float i) 设置左缩进。static voidStyleConstants.setLineSpacing(MutableAttributeSet a, float i) 设置行距。static voidStyleConstants.setRightIndent(MutableAttributeSet a, float i) 设置右缩进。static voidStyleConstants.setSpaceAbove(MutableAttributeSet a, float i) 在上面设置空间。static voidStyleConstants.setSpaceBelow(MutableAttributeSet a, float i) 在下方设置空间。static voidStyleConstants.setStrikeThrough(MutableAttributeSet a, boolean b) 设置删除线属性。static voidStyleConstants.setSubscript(MutableAttributeSet a, boolean b) 设置下标属性。static voidStyleConstants.setSuperscript(MutableAttributeSet a, boolean b) 设置上标属性。static voidStyleConstants.setTabSet(MutableAttributeSet a, TabSet tabs) 设置选项卡集。static voidStyleConstants.setUnderline(MutableAttributeSet a, boolean b) 设置下划线属性。 -
MutableAttributeSet 在 javax.swing.text.html 中的用法
修饰符和类型类描述class表示 HTML 结构 block 的元素。class代表一段文本的元素,该文本块分配有一组 HTML 字符级属性。修饰符和类型方法描述protected MutableAttributeSetStyleSheet.createLargeAttributeSet(AttributeSet a) 创建大量属性,这些属性应该以空间换取时间。HTMLEditorKit.getInputAttributes()获取用于样式化编辑操作的输入属性。javax.swing.text.html 中的方法,参数类型为 MutableAttributeSet修饰符和类型方法描述voidStyleSheet.addCSSAttribute(MutableAttributeSet attr, CSS.Attribute key, String value) 将 CSS 属性添加到给定的集合。booleanStyleSheet.addCSSAttributeFromHTML(MutableAttributeSet attr, CSS.Attribute key, String value) 将 CSS 属性添加到给定的集合。protected voidHTMLDocument.HTMLReader.addSpecialElement(HTML.Tag t, MutableAttributeSet a) 添加基本上完全在属性集中指定的内容。protected voidHTMLDocument.HTMLReader.blockOpen(HTML.Tag t, MutableAttributeSet attr) 向解析缓冲区添加指令以创建具有给定属性的块元素。protected voidHTMLEditorKit.createInputAttributes(Element element, MutableAttributeSet set) 将elements AttributeSet 中的键/值复制到set中。voidHTMLDocument.HTMLReader.handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) 来自解析器的回调。voidHTMLEditorKit.ParserCallback.handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) 来自解析器的回调。voidHTMLDocument.HTMLReader.handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) 来自解析器的回调。voidHTMLEditorKit.ParserCallback.handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) 来自解析器的回调。voidHTMLDocument.HTMLReader.TagAction.start(HTML.Tag t, MutableAttributeSet a) 当看到此操作注册到的标记类型的开始标记时调用。