uTools-Manuals/docs/java/javax/swing/text/AsyncBoxView.ChildLocator.html

314 lines
15 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="Class AsyncBoxView.ChildLocator">Class AsyncBoxView.ChildLocator</h2>
</div><div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javax.swing.text.AsyncBoxView.ChildLocator</li>
</ul> </li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
Enclosing class:
</dt>
<dd>
<span><a href="../../../javax/swing/text/AsyncBoxView.html" title="javax.swing.text中的类">AsyncBoxView</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public class <span class="typeNameLabel">AsyncBoxView.ChildLocator</span>
extends <a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></pre>
<div class="block">
<span>在本地化区域内进行变更时,可以管理子视图在局部区域中的有效位置。</span>
<span>AsyncBoxView可能会不断更改但可见区域需要保持相当稳定直到布局线程决定向父级发布更新。</span>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.3
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- --> </a> <h3>Field Summary</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
<caption>
<span>Fields</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../java/awt/Rectangle.html" title="class in java.awt">Rectangle</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#childAlloc">childAlloc</a></span></code>
<div class="block">
用于子分配的形状,以避免产生大量的垃圾。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../java/awt/Rectangle.html" title="class in java.awt">Rectangle</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#lastAlloc">lastAlloc</a></span></code>
<div class="block">
最后看到的分配(当更改被刷新时重新绘制)。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../javax/swing/text/AsyncBoxView.ChildState.html" title="class in javax.swing.text">AsyncBoxView.ChildState</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#lastValidOffset">lastValidOffset</a></span></code>
<div class="block">
上次偏移计算的位置有效。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- --> </a> <h3>构造方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption>
<span>构造方法</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#ChildLocator--">ChildLocator</a></span>()</code>
<div class="block">
构建一个子定位器。
</div> </td>
</tr>
</tbody>
</table> </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="t4"><span><a href="javascript:show(8);">具体的方法</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/AsyncBoxView.ChildLocator.html#childChanged-javax.swing.text.AsyncBoxView.ChildState-">childChanged</a></span>(<a href="../../../javax/swing/text/AsyncBoxView.ChildState.html" title="class in javax.swing.text">AsyncBoxView.ChildState</a> cs)</code>
<div class="block">
通知孩子改变了。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>protected <a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#getChildAllocation-int-">getChildAllocation</a></span>(int index)</code>
<div class="block">
获取用于子视图的分配。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#getChildAllocation-int-java.awt.Shape-">getChildAllocation</a></span>(int index, <a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> a)</code>
<div class="block">
获取用于子视图的分配。
</div> </td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#getViewIndexAtPoint-float-float-java.awt.Shape-">getViewIndexAtPoint</a></span>(float x, float y, <a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> a)</code>
<div class="block">
在给定点获取子视图索引。
</div> </td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#getViewIndexAtVisualOffset-float-">getViewIndexAtVisualOffset</a></span>(float targetOffset)</code>
<div class="block">
将负责偏移的视图定位到沿主轴的框中。
</div> </td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#paintChildren-java.awt.Graphics-">paintChildren</a></span>(<a href="../../../java/awt/Graphics.html" title="class in java.awt">Graphics</a> g)</code>
<div class="block">
绘制与剪辑区域相交的孩子。
</div> </td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/AsyncBoxView.ChildLocator.html#setAllocation-java.awt.Shape-">setAllocation</a></span>(<a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> a)</code>
<div class="block">
将当前分配的形状复制到用于存储当前分配的Rectangle中。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- --> </a> <h3>Methods inherited from class java.lang.<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></h3> <code><a href="../../../java/lang/Object.html#clone--">clone</a>, <a href="../../../java/lang/Object.html#equals-java.lang.Object-">equals</a>, <a href="../../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../../java/lang/Object.html#hashCode--">hashCode</a>, <a href="../../../java/lang/Object.html#notify--">notify</a>, <a href="../../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../../java/lang/Object.html#toString--">toString</a>, <a href="../../../java/lang/Object.html#wait--">wait</a>, <a href="../../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- --> </a> <h3>字段详细信息</h3> <a name="lastValidOffset">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>lastValidOffset</h4> <pre>protected <a href="../../../javax/swing/text/AsyncBoxView.ChildState.html" title="class in javax.swing.text">AsyncBoxView.ChildState</a> lastValidOffset</pre>
<div class="block">
上次偏移计算的位置有效。
</div> </li>
</ul> <a name="lastAlloc">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>lastAlloc</h4> <pre>protected <a href="../../../java/awt/Rectangle.html" title="class in java.awt">Rectangle</a> lastAlloc</pre>
<div class="block">
最后看到的分配(当更改被刷新时重新绘制)。
</div> </li>
</ul> <a name="childAlloc">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>childAlloc</h4> <pre>protected <a href="../../../java/awt/Rectangle.html" title="class in java.awt">Rectangle</a> childAlloc</pre>
<div class="block">
用于子分配的形状,以避免产生大量的垃圾。
</div> </li>
</ul> </li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- --> </a> <h3>构造方法详细信息</h3> <a name="ChildLocator--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>ChildLocator</h4> <pre>public ChildLocator()</pre>
<div class="block">
构建一个子定位器。
</div> </li>
</ul> </li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="childChanged-javax.swing.text.AsyncBoxView.ChildState-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>childChanged</h4> <pre>public void childChanged(<a href="../../../javax/swing/text/AsyncBoxView.ChildState.html" title="class in javax.swing.text">AsyncBoxView.ChildState</a> cs)</pre>
<div class="block">
<span>通知孩子改变了。</span>
<span>无论是否需要新的偏移计算,这都可以起作用。</span>
<span>这被一个已经改变它的主要跨度的ChildState对象调用。</span>
<span>这可以由多个线程调用。</span>
</div> </li>
</ul> <a name="paintChildren-java.awt.Graphics-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>paintChildren</h4> <pre>public void paintChildren(<a href="../../../java/awt/Graphics.html" title="class in java.awt">Graphics</a> g)</pre>
<div class="block">
绘制与剪辑区域相交的孩子。
</div> </li>
</ul> <a name="getChildAllocation-int-java.awt.Shape-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getChildAllocation</h4> <pre>public <a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> getChildAllocation(int index,
<a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> a)</pre>
<div class="block">
<span>获取用于子视图的分配。</span>
<span>这将更新给定索引之前尚未更新的所有子项的偏移量。</span>
</div> </li>
</ul> <a name="getViewIndexAtPoint-float-float-java.awt.Shape-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getViewIndexAtPoint</h4> <pre>public int getViewIndexAtPoint(float x,
float y,
<a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> a)</pre>
<div class="block">
<span>在给定点获取子视图索引。</span>
<span>这是通过各种View方法调用的需要计算哪个小孩转发消息。</span>
<span>应该通过在该对象上同步的块来调用该对象并且通常将跟随一个或多个调用getChildAllocation也应该位于同步块中</span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>x</code> - X坐标&gt; = 0
</dd>
<dd>
<code>y</code> - Y坐标&gt; = 0
</dd>
<dd>
<code>a</code> - 分配给视图
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
最近的子索引
</dd>
</dl> </li>
</ul> <a name="getChildAllocation-int-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getChildAllocation</h4> <pre>protected <a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> getChildAllocation(int index)</pre>
<div class="block">
<span>获取用于子视图的分配。</span>
<span><em>这不会更新ChildState记录中的偏移量。</em></span>
</div> </li>
</ul> <a name="setAllocation-java.awt.Shape-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>setAllocation</h4> <pre>protected void setAllocation(<a href="../../../java/awt/Shape.html" title="interface in java.awt">Shape</a> a)</pre>
<div class="block">
<span>将当前分配的形状复制到用于存储当前分配的Rectangle中。</span>
<span>这将是Java2D特定实现中的浮点矩形。</span>
</div> </li>
</ul> <a name="getViewIndexAtVisualOffset-float-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>getViewIndexAtVisualOffset</h4> <pre>protected int getViewIndexAtVisualOffset(float targetOffset)</pre>
<div class="block">
<span>将负责偏移的视图定位到沿主轴的框中。</span>
<span>确保在直到给定目标跨越所需偏移量的ChildState对象上设置偏移量。</span>
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
表示给定视觉位置targetOffset的视图的索引如果没有视图表示该位置则为-1
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>