162 lines
9.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.swing.text
</div>
<h2 class="title" title="Interface Style">Interface Style</h2>
</div><div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
All Superinterfaces:
</dt>
<dd>
<span><a href="../../../javax/swing/text/AttributeSet.html" title="javax.swing.text中的接口">AttributeSet</a> <a href="../../../javax/swing/text/MutableAttributeSet.html" title="javax.swing.text中的接口">MutableAttributeSet</a></span>
</dd>
</dl>
<dl>
<dt>
所有已知实现类:
</dt>
<dd>
<span><a href="../../../javax/swing/text/StyleContext.NamedStyle.html" title="javax.swing.text中的类">StyleContext.NamedStyle</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public interface <span class="typeNameLabel">Style</span>
extends <a href="../../../javax/swing/text/MutableAttributeSet.html" title="interface in javax.swing.text">MutableAttributeSet</a></pre>
<div class="block">
<span>与文档中元素关联的属性集合。</span>
<span>由于这些通常用于将字符和段落样式与元素相关联,因此提供了此操作。</span>
<span>与元素相关联的其他自定义属性将有效地位于层次结构中的名称 - 值对,如果在本地未找到名称(密钥),则请求将转发给父级。</span>
<span>通常使用的属性被分离出来,以便于更有效的替代实现。</span>
</div> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- --> </a> <h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.javax.swing.text.AttributeSet">
<!-- --> </a> <h3>Nested classes/interfaces inherited from interface javax.swing.text.<a href="../../../javax/swing/text/AttributeSet.html" title="interface in javax.swing.text">AttributeSet</a></h3> <code><a href="../../../javax/swing/text/AttributeSet.CharacterAttribute.html" title="interface in javax.swing.text">AttributeSet.CharacterAttribute</a>, <a href="../../../javax/swing/text/AttributeSet.ColorAttribute.html" title="interface in javax.swing.text">AttributeSet.ColorAttribute</a>, <a href="../../../javax/swing/text/AttributeSet.FontAttribute.html" title="interface in javax.swing.text">AttributeSet.FontAttribute</a>, <a href="../../../javax/swing/text/AttributeSet.ParagraphAttribute.html" title="interface in javax.swing.text">AttributeSet.ParagraphAttribute</a></code></li>
</ul> </li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- --> </a> <h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.javax.swing.text.AttributeSet">
<!-- --> </a> <h3>Fields inherited from interface javax.swing.text.<a href="../../../javax/swing/text/AttributeSet.html" title="interface in javax.swing.text">AttributeSet</a></h3> <code><a href="../../../javax/swing/text/AttributeSet.html#NameAttribute">NameAttribute</a>, <a href="../../../javax/swing/text/AttributeSet.html#ResolveAttribute">ResolveAttribute</a></code></li>
</ul> </li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t3"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/Style.html#addChangeListener-javax.swing.event.ChangeListener-">addChangeListener</a></span>(<a href="../../../javax/swing/event/ChangeListener.html" title="interface in javax.swing.event">ChangeListener</a> l)</code>
<div class="block">
添加一个监听器,以便在属性被更改时跟踪。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="../../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/Style.html#getName--">getName</a></span>()</code>
<div class="block">
获取样式的名称。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/Style.html#removeChangeListener-javax.swing.event.ChangeListener-">removeChangeListener</a></span>(<a href="../../../javax/swing/event/ChangeListener.html" title="interface in javax.swing.event">ChangeListener</a> l)</code>
<div class="block">
删除跟踪属性更改的侦听器。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.swing.text.MutableAttributeSet">
<!-- --> </a> <h3>Methods inherited from interface javax.swing.text.<a href="../../../javax/swing/text/MutableAttributeSet.html" title="interface in javax.swing.text">MutableAttributeSet</a></h3> <code><a href="../../../javax/swing/text/MutableAttributeSet.html#addAttribute-java.lang.Object-java.lang.Object-">addAttribute</a>, <a href="../../../javax/swing/text/MutableAttributeSet.html#addAttributes-javax.swing.text.AttributeSet-">addAttributes</a>, <a href="../../../javax/swing/text/MutableAttributeSet.html#removeAttribute-java.lang.Object-">removeAttribute</a>, <a href="../../../javax/swing/text/MutableAttributeSet.html#removeAttributes-javax.swing.text.AttributeSet-">removeAttributes</a>, <a href="../../../javax/swing/text/MutableAttributeSet.html#removeAttributes-java.util.Enumeration-">removeAttributes</a>, <a href="../../../javax/swing/text/MutableAttributeSet.html#setResolveParent-javax.swing.text.AttributeSet-">setResolveParent</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.swing.text.AttributeSet">
<!-- --> </a> <h3>Methods inherited from interface javax.swing.text.<a href="../../../javax/swing/text/AttributeSet.html" title="interface in javax.swing.text">AttributeSet</a></h3> <code><a href="../../../javax/swing/text/AttributeSet.html#containsAttribute-java.lang.Object-java.lang.Object-">containsAttribute</a>, <a href="../../../javax/swing/text/AttributeSet.html#containsAttributes-javax.swing.text.AttributeSet-">containsAttributes</a>, <a href="../../../javax/swing/text/AttributeSet.html#copyAttributes--">copyAttributes</a>, <a href="../../../javax/swing/text/AttributeSet.html#getAttribute-java.lang.Object-">getAttribute</a>, <a href="../../../javax/swing/text/AttributeSet.html#getAttributeCount--">getAttributeCount</a>, <a href="../../../javax/swing/text/AttributeSet.html#getAttributeNames--">getAttributeNames</a>, <a href="../../../javax/swing/text/AttributeSet.html#getResolveParent--">getResolveParent</a>, <a href="../../../javax/swing/text/AttributeSet.html#isDefined-java.lang.Object-">isDefined</a>, <a href="../../../javax/swing/text/AttributeSet.html#isEqual-javax.swing.text.AttributeSet-">isEqual</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="getName--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getName</h4> <pre><a href="../../../java/lang/String.html" title="class in java.lang">String</a> getName()</pre>
<div class="block">
<span>获取样式的名称。</span>
<span>不需要样式进行命名,因此<code>null</code>如果没有与样式关联的名称被返回。</span>
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
名字
</dd>
</dl> </li>
</ul> <a name="addChangeListener-javax.swing.event.ChangeListener-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>addChangeListener</h4> <pre>void addChangeListener(<a href="../../../javax/swing/event/ChangeListener.html" title="interface in javax.swing.event">ChangeListener</a> l)</pre>
<div class="block">
添加一个监听器,以便在属性被更改时跟踪。
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>l</code> - 变更听众
</dd>
</dl> </li>
</ul> <a name="removeChangeListener-javax.swing.event.ChangeListener-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>removeChangeListener</h4> <pre>void removeChangeListener(<a href="../../../javax/swing/event/ChangeListener.html" title="interface in javax.swing.event">ChangeListener</a> l)</pre>
<div class="block">
删除跟踪属性更改的侦听器。
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>l</code> - 变更听众
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>