JavaTM 2 Platform
Standard Ed. 6

javax.swing.plaf.multi
类 MultiTextUI

java.lang.Object
  继承者 javax.swing.plaf.ComponentUI
      继承者 javax.swing.plaf.TextUI
          继承者 javax.swing.plaf.multi.MultiTextUI

public class MultiTextUI
extends TextUI

用于组合 TextUI 的多路 UI。

此文件由 AutoMulti 自动生成。


字段摘要
protected  Vector uis
          包含实际 UI 的向量。
 
构造方法摘要
MultiTextUI()
           
 
方法摘要
 boolean contains(JComponent a, int b, int c)
          在由此对象处理的每个 UI 上调用 contains 方法。
static ComponentUI createUI(JComponent a)
          如果任意辅助 LookAndFeel 都支持此 UI,则返回一个多路 UI 实例。
 void damageRange(JTextComponent a, int b, int c)
          在由此对象处理的每个 UI 上调用 damageRange 方法。
 void damageRange(JTextComponent a, int b, int c, Position.Bias d, Position.Bias e)
          在由此对象处理的每个 UI 上调用 damageRange 方法。
 Accessible getAccessibleChild(JComponent a, int b)
          在由此对象处理的每个 UI 上调用 getAccessibleChild 方法。
 int getAccessibleChildrenCount(JComponent a)
          在由此对象处理的每个 UI 上调用 getAccessibleChildrenCount 方法。
 EditorKit getEditorKit(JTextComponent a)
          在由此对象处理的每个 UI 上调用 getEditorKit 方法。
 Dimension getMaximumSize(JComponent a)
          在由此对象处理的每个 UI 上调用 getMaximumSize 方法。
 Dimension getMinimumSize(JComponent a)
          在由此对象处理的每个 UI 上调用 getMinimumSize 方法。
 int getNextVisualPositionFrom(JTextComponent a, int b, Position.Bias c, int d, Position.Bias[] e)
          在由此对象处理的每个 UI 上调用 getNextVisualPositionFrom 方法。
 Dimension getPreferredSize(JComponent a)
          在由此对象处理的每个 UI 上调用 getPreferredSize 方法。
 View getRootView(JTextComponent a)
          在由此对象处理的每个 UI 上调用 getRootView 方法。
 String getToolTipText(JTextComponent a, Point b)
          在由此对象处理的每个 UI 上调用 getToolTipText 方法。
 ComponentUI[] getUIs()
          返回与此多路 UI 关联的 UI 列表。
 void installUI(JComponent a)
          在由此对象处理的每个 UI 上调用 installUI 方法。
 Rectangle modelToView(JTextComponent a, int b)
          在由此对象处理的每个 UI 上调用 modelToView 方法。
 Rectangle modelToView(JTextComponent a, int b, Position.Bias c)
          在由此对象处理的每个 UI 上调用 modelToView 方法。
 void paint(Graphics a, JComponent b)
          在由此对象处理的每个 UI 上调用 paint 方法。
 void uninstallUI(JComponent a)
          在由此对象处理的每个 UI 上调用 uninstallUI 方法。
 void update(Graphics a, JComponent b)
          在由此对象处理的每个 UI 上调用 update 方法。
 int viewToModel(JTextComponent a, Point b)
          在由此对象处理的每个 UI 上调用 viewToModel 方法。
 int viewToModel(JTextComponent a, Point b, Position.Bias[] c)
          在由此对象处理的每个 UI 上调用 viewToModel 方法。
 
从类 javax.swing.plaf.ComponentUI 继承的方法
getBaseline, getBaselineResizeBehavior
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

uis

protected Vector uis
包含实际 UI 的向量。这是在对 createUI 的调用中生成的,并且可通过调用 getUIs 方法获得它。可以保证第一个元素是从默认外观获得的实际 UI。

构造方法详细信息

MultiTextUI

public MultiTextUI()
方法详细信息

getUIs

public ComponentUI[] getUIs()
返回与此多路 UI 关联的 UI 列表。这允许由意识到组件上多路 UI 的应用程序进行 UI 处理。


getToolTipText

public String getToolTipText(JTextComponent a,
                             Point b)
在由此对象处理的每个 UI 上调用 getToolTipText 方法。

覆盖:
TextUI 中的 getToolTipText
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
从以下版本开始:
1.4
另请参见:
JTextComponent.getToolTipText(java.awt.event.MouseEvent)

modelToView

public Rectangle modelToView(JTextComponent a,
                             int b)
                      throws BadLocationException
在由此对象处理的每个 UI 上调用 modelToView 方法。

指定者:
TextUI 中的 modelToView
b - 模型中要转换的本地位置,该位置 >= 0
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
抛出:
BadLocationException - 如果给定位置并不表示相关文档中的一个有效位置

modelToView

public Rectangle modelToView(JTextComponent a,
                             int b,
                             Position.Bias c)
                      throws BadLocationException
在由此对象处理的每个 UI 上调用 modelToView 方法。

指定者:
TextUI 中的 modelToView
b - 模型中要转换的本地位置,该位置 >= 0
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
抛出:
BadLocationException - 如果给定位置并不表示相关文档中的一个有效位置

viewToModel

public int viewToModel(JTextComponent a,
                       Point b)
在由此对象处理的每个 UI 上调用 viewToModel 方法。

指定者:
TextUI 中的 viewToModel
b - 视图中要转换的位置。此位置应该与鼠标事件在同一坐标系统中。
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI

viewToModel

public int viewToModel(JTextComponent a,
                       Point b,
                       Position.Bias[] c)
在由此对象处理的每个 UI 上调用 viewToModel 方法。

指定者:
TextUI 中的 viewToModel
b - 视图中要转换的位置。此位置应该与鼠标事件在同一坐标系统中。
c - 由此方法填充,以指示给定点是更接近于模型中的前一个字符,还是更接近于模型中的下一个字符
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI

getNextVisualPositionFrom

public int getNextVisualPositionFrom(JTextComponent a,
                                     int b,
                                     Position.Bias c,
                                     int d,
                                     Position.Bias[] e)
                              throws BadLocationException
在由此对象处理的每个 UI 上调用 getNextVisualPositionFrom 方法。

指定者:
TextUI 中的 getNextVisualPositionFrom
参数:
a - 为其安装此 UI 的文本组件
b - 要转换的位置,该位置 >= 0
c - 位置的偏差
d - 以当前位置开始的方向,可以将它们设想为通常出现在键盘上的箭头键。该参数可以是 SwingConstants.WEST、SwingConstants.EAST、SwingConstants.NORTH 或 SwingConstants.SOUTH
e - 包含返回位置偏差的数组
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
抛出:
BadLocationException

damageRange

public void damageRange(JTextComponent a,
                        int b,
                        int c)
在由此对象处理的每个 UI 上调用 damageRange 方法。

指定者:
TextUI 中的 damageRange
b - 范围的起始位置,该位置 >= 0
c - 范围的结束位置,该位置 >= p0

damageRange

public void damageRange(JTextComponent a,
                        int b,
                        int c,
                        Position.Bias d,
                        Position.Bias e)
在由此对象处理的每个 UI 上调用 damageRange 方法。

指定者:
TextUI 中的 damageRange
b - 范围的起始位置,该位置 >= 0
c - 范围的结束位置,该位置 >= p0

getEditorKit

public EditorKit getEditorKit(JTextComponent a)
在由此对象处理的每个 UI 上调用 getEditorKit 方法。

指定者:
TextUI 中的 getEditorKit
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI

getRootView

public View getRootView(JTextComponent a)
在由此对象处理的每个 UI 上调用 getRootView 方法。

指定者:
TextUI 中的 getRootView
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
在由此对象处理的每个 UI 上调用 contains 方法。

覆盖:
ComponentUI 中的 contains
参数:
a - 将在其中查询 x,y 的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
b - 点的 x 坐标
c - 点的 y 坐标
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
另请参见:
JComponent.contains(int, int), Component.contains(int, int)

update

public void update(Graphics a,
                   JComponent b)
在由此对象处理的每个 UI 上调用 update 方法。

覆盖:
ComponentUI 中的 update
参数:
a - 将在其中进行绘制的 Graphics 上下文
b - 将绘制的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
另请参见:
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent), JComponent.paintComponent(java.awt.Graphics)

createUI

public static ComponentUI createUI(JComponent a)
如果任意辅助 LookAndFeel 都支持此 UI,则返回一个多路 UI 实例。否则只返回从默认 LookAndFeel 获得的 UI 对象。


installUI

public void installUI(JComponent a)
在由此对象处理的每个 UI 上调用 installUI 方法。

覆盖:
ComponentUI 中的 installUI
参数:
a - 将安装此 UI 委托的组件
另请参见:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent a)
在由此对象处理的每个 UI 上调用 uninstallUI 方法。

覆盖:
ComponentUI 中的 uninstallUI
参数:
a - 从中移除此 UI 委托的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
另请参见:
ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()

paint

public void paint(Graphics a,
                  JComponent b)
在由此对象处理的每个 UI 上调用 paint 方法。

覆盖:
ComponentUI 中的 paint
参数:
a - 将在其中进行绘制的 Graphics 上下文
b - 将绘制的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
另请参见:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

getPreferredSize

public Dimension getPreferredSize(JComponent a)
在由此对象处理的每个 UI 上调用 getPreferredSize 方法。

覆盖:
ComponentUI 中的 getPreferredSize
参数:
a - 将查询其首选大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
另请参见:
JComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)

getMinimumSize

public Dimension getMinimumSize(JComponent a)
在由此对象处理的每个 UI 上调用 getMinimumSize 方法。

覆盖:
ComponentUI 中的 getMinimumSize
参数:
a - 将查询其最小大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
另请参见:
JComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)

getMaximumSize

public Dimension getMaximumSize(JComponent a)
在由此对象处理的每个 UI 上调用 getMaximumSize 方法。

覆盖:
ComponentUI 中的 getMaximumSize
参数:
a - 将查询其最大大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
另请参见:
JComponent.getMaximumSize(), LayoutManager2.maximumLayoutSize(java.awt.Container)

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
在由此对象处理的每个 UI 上调用 getAccessibleChildrenCount 方法。

覆盖:
ComponentUI 中的 getAccessibleChildrenCount
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
另请参见:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
在由此对象处理的每个 UI 上调用 getAccessibleChild 方法。

覆盖:
ComponentUI 中的 getAccessibleChild
b - 子对象的从零开始的索引
返回:
从第一个 UI 获得的值,该 UI 是从默认 LookAndFeel 获得的 UI
另请参见:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only