|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
| 使用 Component 的软件包 | |
|---|---|
| java.applet | 提供创建 applet 所必需的类和 applet 用来与其 applet 上下文通信的类。 |
| java.awt | 包含用于创建用户界面和绘制图形图像的所有类。 |
| java.awt.dnd | Drag 和 Drop 是一种直接操作操作,在许多图形用户界面系统中都会遇到它,它提供了一种机制,能够在两个与 GUI 中显示元素逻辑相关的实体之间传输信息。 |
| java.awt.event | 提供处理由 AWT 组件所激发的各类事件的接口和类。 |
| java.awt.im | 提供输入方法框架所需的类和接口。 |
| java.beans | 包含与开发 beans 有关的类,即基于 JavaBeansTM 架构的组件。 |
| java.beans.beancontext | 提供与 bean 上下文有关的类和接口。 |
| javax.swing | 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 |
| javax.swing.border | 提供围绕 Swing 组件绘制特殊边框的类和接口。 |
| javax.swing.colorchooser | 包含供 JColorChooser 组件使用的类和接口。 |
| javax.swing.event | 供 Swing 组件触发的事件使用。 |
| javax.swing.plaf | 提供一个接口和许多抽象类,Swing 用它们来提供自己的可插入外观功能。 |
| javax.swing.plaf.basic | 提供了根据基本外观构建的用户界面对象。 |
| javax.swing.plaf.metal | 提供根据 Java 外观(曾经代称为 Metal)构建的用户界面对象,Java 外观是默认外观。 |
| javax.swing.plaf.synth | Synth 是一个可更换皮肤 (skinnable) 的外观,在其中可委托所有绘制。 |
| javax.swing.table | 提供用于处理 javax.swing.JTable 的类和接口。 |
| javax.swing.text | 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 |
| javax.swing.text.html | 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 |
| javax.swing.tree | 提供处理 javax.swing.JTree 的类和接口。 |
| java.applet 中 Component 的使用 |
|---|
| java.applet 中 Component 的子类 | |
|---|---|
class |
Applet
applet 是一种不适合单独运行但可嵌入在其他应用程序中的小程序。 |
| java.awt 中 Component 的使用 |
|---|
| java.awt 中 Component 的子类 | |
|---|---|
class |
Button
此类创建一个标签按钮。 |
class |
Canvas
Canvas 组件表示屏幕上一个空白矩形区域,应用程序可以在该区域内绘图,或者可以从该区域捕获用户的输入事件。 |
class |
Checkbox
复选框是一个可处于“开”( true) 或“关”(false) 状态的图形组件。 |
class |
Choice
Choice 类表示一个弹出式选择菜单。 |
class |
Container
一般的 Abstract Window Toolkit(AWT) 容器对象是一个可包含其他 AWT 组件的组件。 |
class |
Dialog
Dialog 是一个带标题和边界的顶层窗口,边界一般用于从用户处获得某种形式的输入。 |
class |
FileDialog
FileDialog 类显示一个对话框窗口,用户可以从中选择文件。 |
class |
Frame
Frame 是带有标题和边界的顶层窗口。 |
class |
Label
Label 对象是一个可在容器中放置文本的组件。 |
class |
List
List 组件为用户提供了一个可滚动的文本项列表。 |
class |
Panel
Panel 是最简单的容器类。 |
class |
Scrollbar
Scrollbar 类描述了一个滚动条,这是大家所熟悉的用户界面对象。 |
class |
ScrollPane
实现用于单个子组件的自动水平和/或垂直滚动的容器类。 |
class |
TextArea
TextArea 对象是显示文本的多行区域。 |
class |
TextComponent
TextComponent 类是允许编辑文本的任何组件的超类。 |
class |
TextField
TextField 对象是允许编辑单行文本的文本组件。 |
class |
Window
Window 对象是一个没有边界和菜单栏的顶层窗口。 |
| 类型参数类型为 Component 的 java.awt 中的字段 | |
|---|---|
protected Hashtable<Component,GridBagConstraints> |
GridBagLayout.comptable
此哈希表维持组件与其网格包约束之间的关联。 |
| 返回 Component 的 java.awt 中的方法 | |
|---|---|
Component |
Container.add(Component comp)
将指定组件追加到此容器的尾部。 |
Component |
Container.add(Component comp,
int index)
将指定组件添加到此容器的给定位置上。 |
Component |
Container.add(String name,
Component comp)
将指定组件添加到此容器中。 |
Component |
Container.findComponentAt(int x,
int y)
对包含指定位置的可视子组件进行定位。 |
Component |
Container.findComponentAt(Point p)
对包含指定点的可视子组件进行定位。 |
Component |
Container.getComponent(int n)
获得此容器中的第 n 个组件。 |
abstract Component |
FocusTraversalPolicy.getComponentAfter(Container aContainer,
Component aComponent)
返回应该接收 aComponent 之后的焦点的 Component,aContainer 必须是 aComponent 的焦点循环根,或者焦点遍历策略提供者。 |
Component |
ContainerOrderFocusTraversalPolicy.getComponentAfter(Container aContainer,
Component aComponent)
返回应该接收 aComponent 后面的焦点的 Component。 |
Component |
Component.getComponentAt(int x,
int y)
确定此组件或其直接子组件之一是否包含(x,y)位置,并且如果是,则返回包含该位置的组件。 |
Component |
Container.getComponentAt(int x,
int y)
对包含 x,y 位置的组件进行定位。 |
Component |
Component.getComponentAt(Point p)
返回包含指定点的组件或子组件。 |
Component |
Container.getComponentAt(Point p)
获得包含指定点的组件。 |
abstract Component |
FocusTraversalPolicy.getComponentBefore(Container aContainer,
Component aComponent)
返回应该接收 aComponent 之前的焦点的 Component,aContainer 必须是 aComponent 的焦点循环根,或焦点遍历策略提供者。 |
Component |
ContainerOrderFocusTraversalPolicy.getComponentBefore(Container aContainer,
Component aComponent)
返回应该接收 aComponent 前面的焦点的 Component。 |
Component[] |
Container.getComponents()
获得此容器中的所有组件。 |
abstract Component |
FocusTraversalPolicy.getDefaultComponent(Container aContainer)
返回要聚焦的默认 Component。 |
Component |
ContainerOrderFocusTraversalPolicy.getDefaultComponent(Container aContainer)
返回默认拥有焦点的 Component。 |
abstract Component |
FocusTraversalPolicy.getFirstComponent(Container aContainer)
返回遍历循环中的第一个 Component。 |
Component |
ContainerOrderFocusTraversalPolicy.getFirstComponent(Container aContainer)
返回遍历循环中的第一个 Component。 |
Component |
Window.getFocusOwner()
如果此窗口为焦点窗口,则返回其具有焦点窗口的子组件;否则返回 null。 |
Component |
KeyboardFocusManager.getFocusOwner()
如果焦点所有者与调用线程位于同一个上下文中,则返回该焦点所有者。 |
protected Component |
KeyboardFocusManager.getGlobalFocusOwner()
返回焦点所有者,即使调用线程处于焦点所有者之外的上下文中。 |
protected Component |
KeyboardFocusManager.getGlobalPermanentFocusOwner()
返回持久焦点所有者,即使调用线程处于该持久焦点所有者之外的上下文中。 |
Component |
FocusTraversalPolicy.getInitialComponent(Window window)
返回第一次将窗口设置为可见时,应该接收焦点的 Component。 |
abstract Component |
FocusTraversalPolicy.getLastComponent(Container aContainer)
返回遍历循环中的最后一个 Component。 |
Component |
ContainerOrderFocusTraversalPolicy.getLastComponent(Container aContainer)
返回遍历循环中的最后一个 Component。 |
Component |
BorderLayout.getLayoutComponent(Container target,
Object constraints)
基于目标 Container 的组件方向,获得给定约束位置所对应的组件 |
Component |
BorderLayout.getLayoutComponent(Object constraints)
获得使用给定约束添加的组件。 |
Component |
Window.getMostRecentFocusOwner()
返回此窗口的子组件,该子组件在此窗口为焦点窗口时将接收焦点。 |
Component |
KeyboardFocusManager.getPermanentFocusOwner()
如果持久焦点所有者与调用线程位于同一个上下文中,则返回持久焦点所有者。 |
Component |
Component.locate(int x,
int y)
已过时。 从 JDK version 1.1 开始,由 getComponentAt(int, int) 取代。 |
Component |
Container.locate(int x,
int y)
已过时。 从 JDK version 1.1 开始,用 getComponentAt(int, int) 取代。 |
| 参数类型为 Component 的 java.awt 中的方法 | ||
|---|---|---|
protected boolean |
ContainerOrderFocusTraversalPolicy.accept(Component aComponent)
确定是否可以接受选择某个 Component 作为新的焦点拥有者。 |
|
protected boolean |
DefaultFocusTraversalPolicy.accept(Component aComponent)
确定是否可以接受选择某个 Component 作为新的焦点所有者。 |
|
Component |
Container.add(Component comp)
将指定组件追加到此容器的尾部。 |
|
Component |
Container.add(Component comp,
int index)
将指定组件添加到此容器的给定位置上。 |
|
void |
Container.add(Component comp,
Object constraints)
将指定的组件添加到此容器的尾部。 |
|
void |
Container.add(Component comp,
Object constraints,
int index)
使用指定约束 (Constraints),将指定组件添加到此容器的指定索引所在的位置上。 |
|
Component |
Container.add(String name,
Component comp)
将指定组件添加到此容器中。 |
|
protected void |
Container.addImpl(Component comp,
Object constraints,
int index)
将指定组件添加到此容器的指定索引所在的位置上。 |
|
protected void |
ScrollPane.addImpl(Component comp,
Object constraints,
int index)
将指定的组件添加到此滚动窗格容器。 |
|
void |
LayoutManager2.addLayoutComponent(Component comp,
Object constraints)
使用指定约束对象,将指定组件添加到布局。 |
|
void |
BorderLayout.addLayoutComponent(Component comp,
Object constraints)
使用指定的约束对象将指定组件添加到布局中。 |
|
void |
CardLayout.addLayoutComponent(Component comp,
Object constraints)
将指定的组件添加到此卡片布局的内部名称表。 |
|
void |
GridBagLayout.addLayoutComponent(Component comp,
Object constraints)
使用指定 constraints 对象将指定组件添加到布局中。 |
|
void |
LayoutManager.addLayoutComponent(String name,
Component comp)
如果布局管理器使用每组件字符串,则将组件 comp 添加到布局,并将其与 name 指定的字符串关联。 |
|
void |
BorderLayout.addLayoutComponent(String name,
Component comp)
已过时。 由 addLayoutComponent(Component, Object) 取代。 |
|
void |
FlowLayout.addLayoutComponent(String name,
Component comp)
将指定的组件添加到布局中。 |
|
void |
CardLayout.addLayoutComponent(String name,
Component comp)
已过时。 由 addLayoutComponent(Component, Object) 取代。 |
|
void |
GridLayout.addLayoutComponent(String name,
Component comp)
将具有指定名称的指定组件添加到布局。 |
|
void |
GridBagLayout.addLayoutComponent(String name,
Component comp)
无效,因为此布局管理器不使用每组件字符串。 |
|
protected java.awt.peer.LightweightPeer |
Toolkit.createComponent(Component target)
创建组件或容器的同位体。 |
|
|
Toolkit.createDragGestureRecognizer(Class<T> abstractRecognizerClass,
DragSource ds,
Component c,
int srcActions,
DragGestureListener dgl)
创建所请求的抽象 DragGestureRecognizer 类的具体的、与平台相关的子类,并将它与指定的 DragSource、Component 和 DragGestureListener 相关联。 |
|
protected abstract void |
KeyboardFocusManager.dequeueKeyEvents(long after,
Component untilFocused)
由 AWT 调用以通知 KeyboardFocusManager 应该取消延迟指派 KeyEvent。 |
|
protected void |
DefaultKeyboardFocusManager.dequeueKeyEvents(long after,
Component untilFocused)
释放正常指派到当前焦点所有者的所有 KeyEvent,这些 KeyEvent 因为调用了具有相同时间戳和 Component 的 enqueueKeyEvents 而被加入队列。 |
|
protected abstract void |
KeyboardFocusManager.discardKeyEvents(Component comp)
由 AWT 调用以通知 KeyboardFocusManager 应该取消延迟指派 KeyEvent。 |
|
protected void |
DefaultKeyboardFocusManager.discardKeyEvents(Component comp)
放弃因为一次或多次调用具有指定 Component 或其子代之一的 enqueueKeyEvents 而加入队列的所有 KeyEvent。 |
|
protected abstract void |
KeyboardFocusManager.enqueueKeyEvents(long after,
Component untilFocused)
在指定的 Component 成为焦点所有者以前由 AWT 调用,以通知 KeyboardFocusManager 延迟指派 KeyEvent。 |
|
protected void |
DefaultKeyboardFocusManager.enqueueKeyEvents(long after,
Component untilFocused)
延迟对 KeyEvent 的指派,直到指定的 Component 成为焦点所有者。 |
|
abstract void |
KeyboardFocusManager.focusNextComponent(Component aComponent)
聚焦 aComponent 之后的 Component,通常基于 FocusTraversalPolicy。 |
|
void |
DefaultKeyboardFocusManager.focusNextComponent(Component aComponent)
使 aComponent 后面的 Component 拥有焦点,通常基于 FocusTraversalPolicy。 |
|
abstract void |
KeyboardFocusManager.focusPreviousComponent(Component aComponent)
聚焦 aComponent 之前的 Component,通常基于 FocusTraversalPolicy。 |
|
void |
DefaultKeyboardFocusManager.focusPreviousComponent(Component aComponent)
使 aComponent 前面的 Component 拥有焦点,通常基于 FocusTraversalPolicy。 |
|
abstract Component |
FocusTraversalPolicy.getComponentAfter(Container aContainer,
Component aComponent)
返回应该接收 aComponent 之后的焦点的 Component,aContainer 必须是 aComponent 的焦点循环根,或者焦点遍历策略提供者。 |
|
Component |
ContainerOrderFocusTraversalPolicy.getComponentAfter(Container aContainer,
Component aComponent)
返回应该接收 aComponent 后面的焦点的 Component。 |
|
abstract Component |
FocusTraversalPolicy.getComponentBefore(Container aContainer,
Component aComponent)
返回应该接收 aComponent 之前的焦点的 Component,aContainer 必须是 aComponent 的焦点循环根,或焦点遍历策略提供者。 |
|
Component |
ContainerOrderFocusTraversalPolicy.getComponentBefore(Container aContainer,
Component aComponent)
返回应该接收 aComponent 前面的焦点的 Component。 |
|
int |
Container.getComponentZOrder(Component comp)
返回容器内组件的 z 顺序索引。 |
|
Object |
BorderLayout.getConstraints(Component comp)
获得指定组件的约束 |
|
GridBagConstraints |
GridBagLayout.getConstraints(Component comp)
获得指定组件的约束。 |
|
protected static Container |
Toolkit.getNativeContainer(Component c)
使本机同位体能够查询给定本机组件的本机容器(例如,直接父组件可以是轻量级的)。 |
|
boolean |
Container.isAncestorOf(Component c)
检查该组件是否包含在此容器的组件层次结构中。 |
|
protected GridBagConstraints |
GridBagLayout.lookupConstraints(Component comp)
检索指定组件的约束。 |
|
abstract void |
KeyboardFocusManager.processKeyEvent(Component focusedComponent,
KeyEvent e)
当且仅当该 KeyEvent 表示指定 focusedComponent 的焦点遍历键时,此方法启动焦点遍历操作。 |
|
void |
DefaultKeyboardFocusManager.processKeyEvent(Component focusedComponent,
KeyEvent e)
当且仅当该 KeyEvent 表示指定 focusedComponent 的焦点遍历键时,此方法才会启动一个焦点遍历操作。 |
|
void |
KeyboardFocusManager.redispatchEvent(Component target,
AWTEvent e)
重新指派 AWTEvent 的方式是,AWT 事件调度程序不会递归式请求 KeyboardFocusManager 或任何已安装的 KeyEventDispatcher 再次指派该事件。 |
|
void |
Container.remove(Component comp)
从此容器中移除指定组件。 |
|
void |
LayoutManager.removeLayoutComponent(Component comp)
从布局移除指定组件。 |
|
void |
BorderLayout.removeLayoutComponent(Component comp)
从此边界布局中移除指定组件。 |
|
void |
FlowLayout.removeLayoutComponent(Component comp)
从布局中移除指定的组件。 |
|
void |
CardLayout.removeLayoutComponent(Component comp)
从布局中移除指定的组件。 |
|
void |
GridLayout.removeLayoutComponent(Component comp)
从布局移除指定组件。 |
|
void |
GridBagLayout.removeLayoutComponent(Component comp)
从此布局移除指定组件。 |
|
void |
Container.setComponentZOrder(Component comp,
int index)
将指定组件移动到容器中指定的 z 顺序索引。 |
|
void |
GridBagLayout.setConstraints(Component comp,
GridBagConstraints constraints)
设置此布局中指定组件的约束条件。 |
|
protected void |
KeyboardFocusManager.setGlobalFocusOwner(Component focusOwner)
设置焦点所有者。 |
|
protected void |
KeyboardFocusManager.setGlobalPermanentFocusOwner(Component permanentFocusOwner)
设置持久焦点所有者。 |
|
void |
Window.setLocationRelativeTo(Component c)
设置此窗口相对于指定组件的位置。 |
|
void |
PopupMenu.show(Component origin,
int x,
int y)
在相对于初始组件的 x、y 位置显示弹出式菜单。 |
|
abstract void |
KeyboardFocusManager.upFocusCycle(Component aComponent)
将焦点上移一个焦点遍历循环。 |
|
void |
DefaultKeyboardFocusManager.upFocusCycle(Component aComponent)
将焦点上移一个焦点遍历循环。 |
|
| 参数类型为 Component 的 java.awt 中的构造方法 | |
|---|---|
MediaTracker(Component comp)
创建媒体跟踪器以跟踪给定组件的图像。 |
|
| java.awt.dnd 中 Component 的使用 |
|---|
| 声明为 Component 的 java.awt.dnd 中的字段 | |
|---|---|
protected Component |
DragGestureRecognizer.component
与此 DragGestureRecognizer 关联的 Component。 |
| 返回 Component 的 java.awt.dnd 中的方法 | |
|---|---|
Component |
DropTarget.getComponent()
获得与此 DropTarget 关联的 Component。 |
Component |
DropTargetContext.getComponent()
此方法返回与此 DropTargetContext 相关的 Component。 |
Component |
DragGestureRecognizer.getComponent()
此方法返回 DragGestureRecognizer 所“观察”的Component,以便了解拖动开始动作。 |
Component |
DragGestureEvent.getComponent()
返回与此 DragGestureEvent 关联的 Component。 |
Component |
DragSourceContext.getComponent()
返回与此 DragSourceContext 相关联的 Component。 |
| 参数类型为 Component 的 java.awt.dnd 中的方法 | ||
|---|---|---|
DragGestureRecognizer |
DragSource.createDefaultDragGestureRecognizer(Component c,
int actions,
DragGestureListener dgl)
创建一个新的 DragGestureRecognizer,为此 DragSource 实现 DragGestureRecognizer 的默认抽象子类并在新创建的对象上设置指定的 Component 和 DragGestureListener。 |
|
|
DragSource.createDragGestureRecognizer(Class<T> recognizerAbstractClass,
Component c,
int actions,
DragGestureListener dgl)
创建一个新的 DragGestureRecognizer,实现 DragGestureRecognizer 的指定抽象子类并在新创建的对象上设置指定的 Component 和 DragGestureListener。 |
|
protected DropTarget.DropTargetAutoScroller |
DropTarget.createDropTargetAutoScroller(Component c,
Point p)
创建一个嵌入式自动滚动条 |
|
void |
DropTarget.setComponent(Component c)
注意:要求此接口允许 DropTarget 以下面两种方式之一与 Component 安全关联: component.setDropTarget(droptarget) 或 droptarget.setComponent(component)。 |
|
void |
DragGestureRecognizer.setComponent(Component c)
设置与该 DragGestureRecognizer 关联的 Component 使用此方法时还会调用 registerListeners() 和 unregisterListeners()。 |
|
| 参数类型为 Component 的 java.awt.dnd 中的构造方法 | |
|---|---|
DragGestureRecognizer(DragSource ds,
Component c)
构造一个新的 DragGestureRecognizer,使其具有给定此 Drag 和 Drop 操作中使用的 DragSource 和此 DragGestureRecognizer 应该“观察”拖动开始动作的 Component。 |
|
DragGestureRecognizer(DragSource ds,
Component c,
int sa)
构造一个新的 DragGestureRecognizer,使其具有给定此 Drag 和 Drop 操作中使用的 DragSource、此 DragGestureRecognizer 应该“观察”拖动开始动作的 Component 和此 Drag 和 Drop 操作所支持的动作。 |
|
DragGestureRecognizer(DragSource ds,
Component c,
int sa,
DragGestureListener dgl)
构造一个新的 DragGestureRecognizer,使其具有给定此 Drag 和 Drop 操作中使用的 DragSource、此 DragGestureRecognizer 应该“观察”拖动开始动作的 Component、此 Drag 和 Drop 操作所支持的动作和一旦检测到拖动开始动作要通知的 DragGestureListener。 |
|
DropTarget.DropTargetAutoScroller(Component c,
Point p)
构造一个 DropTargetAutoScroller |
|
DropTarget(Component c,
DropTargetListener dtl)
在给出与之关联的 Component 和执行事件处理的 DropTargetListener 的情况下创建一个 DropTarget。 |
|
DropTarget(Component c,
int ops,
DropTargetListener dtl)
在给出与之关联的 Component、表示支持的默认可接受操作的 int 值和执行事件处理的 DropTargetListener 的情况下,创建一个 DropTarget。 |
|
DropTarget(Component c,
int ops,
DropTargetListener dtl,
boolean act)
在给出与之关联的 Component、表示支持的默认可接受操作的 int 值、执行事件处理的 DropTargetListener 和表示 DropTarget 当前是否接受 drop 的 boolean 值的情况下,创建一个 DropTarget。 |
|
DropTarget(Component c,
int ops,
DropTargetListener dtl,
boolean act,
FlavorMap fm)
在给出与之关联的 Component、表示要支持的默认可接受操作的 int 值、执行事件处理的 DropTargetListener、表示 DropTarget 当前是否接受 drop 的 boolean 值和要使用的 FlavorMap(使用默认 FlavorMap 时为 null)的情况下,创建一个新的 DropTarget。 |
|
MouseDragGestureRecognizer(DragSource ds,
Component c)
给出 Component c 的 DragSource、要观察的 Component,构造一个新的 MouseDragGestureRecognizer。 |
|
MouseDragGestureRecognizer(DragSource ds,
Component c,
int act)
给出 Component c 的 DragSource、要观察的 Component,以及此拖动操作允许的操作,构造一个新的 MouseDragGestureRecognizer。 |
|
MouseDragGestureRecognizer(DragSource ds,
Component c,
int act,
DragGestureListener dgl)
给出 Component c 的 DragSource、要观察的 Component、此拖动操作允许的操作,以及检测到拖动动作时发出通知的 DragGestureListener,构造一个新的 MouseDragGestureRecognizer。 |
|
| java.awt.event 中 Component 的使用 |
|---|
| 返回 Component 的 java.awt.event 中的方法 | |
|---|---|
Component |
HierarchyEvent.getChanged()
返回位于被更改层次结构顶部的 Component。 |
Component |
ContainerEvent.getChild()
返回受事件影响的组件。 |
Component |
ComponentEvent.getComponent()
返回事件的始发者。 |
Component |
HierarchyEvent.getComponent()
返回事件的始发者。 |
Component |
FocusEvent.getOppositeComponent()
返回此焦点更改中涉及的另一个 Component。 |
| 参数类型为 Component 的 java.awt.event 中的构造方法 | |
|---|---|
ComponentEvent(Component source,
int id)
构造一个 ComponentEvent 对象。 |
|
ContainerEvent(Component source,
int id,
Component child)
构造一个 ContainerEvent 对象。 |
|
FocusEvent(Component source,
int id)
构造一个 FocusEvent 对象,并将它标识为一个持久性焦点更改。 |
|
FocusEvent(Component source,
int id,
boolean temporary)
构造一个 FocusEvent 对象,并将标识更改是否为暂时的。 |
|
FocusEvent(Component source,
int id,
boolean temporary,
Component opposite)
构造一个 FocusEvent 对象,它具有指定的暂时状态和对立 Component。 |
|
HierarchyEvent(Component source,
int id,
Component changed,
Container changedParent)
构造一个 HierarchyEvent 对象来标识 Component 层次结构中的更改。 |
|
HierarchyEvent(Component source,
int id,
Component changed,
Container changedParent,
long changeFlags)
构造一个 HierarchyEvent 对象来标识 Component 层次结构中的更改。 |
|
InputMethodEvent(Component source,
int id,
AttributedCharacterIterator text,
int committedCharacterCount,
TextHitInfo caret,
TextHitInfo visiblePosition)
通过指定源组件、类型、文本、插入符和 visiblePosition 来构造 InputMethodEvent。 |
|
InputMethodEvent(Component source,
int id,
long when,
AttributedCharacterIterator text,
int committedCharacterCount,
TextHitInfo caret,
TextHitInfo visiblePosition)
通过指定源组件、类型、时间、文本、插入符和 visiblePosition 来构造 InputMethodEvent。 |
|
InputMethodEvent(Component source,
int id,
TextHitInfo caret,
TextHitInfo visiblePosition)
通过指定源组件、类型、插入符和 visiblePosition 来构造 InputMethodEvent。 |
|
KeyEvent(Component source,
int id,
long when,
int modifiers,
int keyCode)
已过时。 从 JDK1.1 开始 |
|
KeyEvent(Component source,
int id,
long when,
int modifiers,
int keyCode,
char keyChar)
构造一个 KeyEvent 对象。 |
|
KeyEvent(Component source,
int id,
long when,
int modifiers,
int keyCode,
char keyChar,
int keyLocation)
|
|
MouseEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger)
构造一个具有指定源组件、类型、修饰符、坐标和单击计数的 MouseEvent 对象。 |
|
MouseEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger,
int button)
构造一个具有指定源组件、类型、修饰符、坐标和单击计数的 MouseEvent 对象。 |
|
MouseWheelEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger,
int scrollType,
int scrollAmount,
int wheelRotation)
构造一个具有指定源组件、类型、修饰符、坐标、滚动类型、滚动量和滚轮旋转的 MouseWheelEvent。 |
|
PaintEvent(Component source,
int id,
Rectangle updateRect)
构造一个具有指定源组件和类型的 PaintEvent 对象。 |
|
| java.awt.im 中 Component 的使用 |
|---|
| 参数类型为 Component 的 java.awt.im 中的方法 | |
|---|---|
void |
InputContext.removeNotify(Component client)
通知输入上下文,客户端组件已从它的包含层次结构中移除,或该组件已禁用输入方法支持。 |
| java.beans 中 Component 的使用 |
|---|
| 返回 Component 的 java.beans 中的方法 | |
|---|---|
Component |
PropertyEditor.getCustomEditor()
PropertyEditor 可以选择使用完全自定义的 Component 来编辑自己的属性值。 |
Component |
PropertyEditorSupport.getCustomEditor()
PropertyEditor 可以选择使用完全自定义的 Component 来编辑自己的属性值。 |
| java.beans.beancontext 中 Component 的使用 |
|---|
| 返回 Component 的 java.beans.beancontext 中的方法 | |
|---|---|
Component |
BeanContextChildComponentProxy.getComponent()
获得与此 BeanContextChild 相关联的 java.awt.Component。 |
| javax.swing 中 Component 的使用 |
|---|
| javax.swing 中 Component 的子类 | |
|---|---|
class |
AbstractButton
定义按钮和菜单项的一般行为。 |
class |
Box
使用 BoxLayout 对象作为其布局管理器的一个轻量级容器。 |
static class |
Box.Filler
参与布局但没有视图的轻量级组件的实现。 |
class |
CellRendererPane
此类被插入在单元格渲染器与使用它们的组件之间。 |
class |
DefaultListCellRenderer
呈现列表中的一个项。 |
static class |
DefaultListCellRenderer.UIResource
实现 UIResource 的 DefaultListCellRenderer 的子类。 |
class |
JApplet
java.applet.Applet 的扩展版,它添加了对 JFC/Swing 组件架构的支持。 |
class |
JButton
"push" 按钮的实现。 |
class |
JCheckBox
复选框的实现,复选框是一个可以被选定和取消选定的项,它将其状态显示给用户。 |
class |
JCheckBoxMenuItem
可以被选定或取消选定的菜单项。 |
class |
JColorChooser
JColorChooser 提供一个用于允许用户操作和选择颜色的控制器窗格。 |
class |
JComboBox
将按钮或可编辑字段与下拉列表组合的组件。 |
class |
JComponent
该类是除顶层容器外所有 Swing 组件的基类。 |
class |
JDesktopPane
用于创建多文档界面或虚拟桌面的容器。 |
class |
JDialog
创建对话框窗口的主要类。 |
class |
JEditorPane
可编辑各种内容的文本组件。 |
class |
JFileChooser
JFileChooser 为用户选择文件提供了一种简单的机制。 |
class |
JFormattedTextField
JFormattedTextField 扩展了 JTextField,添加了对格式化任意值的支持,以及一旦用户编辑了文本就检索特定对象的支持。 |
class |
JFrame
java.awt.Frame 的扩展版本,该版本添加了对 JFC/Swing 组件架构的支持。 |
class |
JInternalFrame
提供很多本机窗体功能的轻量级对象,这些功能包括拖动、关闭、变成图标、调整大小、标题显示和支持菜单栏。 |
static class |
JInternalFrame.JDesktopIcon
此组件表示 JInternalFrame 的图标化版本。 |
class |
JLabel
用于短文本字符串或图像或二者的显示区。 |
class |
JLayeredPane
JLayeredPane 为 JFC/Swing 容器添加了深度,允许组件在需要时互相重叠。 |
class |
JList
该组件允许用户从列表中选择一个或多个对象。 |
class |
JMenu
菜单的该实现是一个包含 JMenuItem 的弹出窗口,用户选择 JMenuBar 上的项时会显示该 JMenuItem。 |
class |
JMenuBar
菜单栏的实现。 |
class |
JMenuItem
菜单中的项的实现。 |
class |
JOptionPane
JOptionPane 有助于方便地弹出要求用户提供值或向其发出通知的标准对话框。 |
class |
JPanel
JPanel 是一般轻量级容器。 |
class |
JPasswordField
JPasswordField 是一个轻量级组件,允许编辑一个单行文本,其视图指示键入内容,但不显示原始字符。 |
class |
JPopupMenu
弹出菜单的实现,弹出菜单是一个可弹出并显示一系列选项的小窗口。 |
static class |
JPopupMenu.Separator
弹出与菜单有关的分隔符。 |
class |
JProgressBar
默认显示有界区间整数值的组件。 |
class |
JRadioButton
实现一个单选按钮,此按钮项可被选择或取消选择,并可为用户显示其状态。 |
class |
JRadioButtonMenuItem
一个单选按钮菜单项的实现。 |
class |
JRootPane
该轻量级容器由 JFrame、JDialog、JWindow、JApplet 和 JInternalFrame 在后台使用。 |
class |
JScrollBar
滚动条的实现。 |
class |
JScrollPane
提供轻量级组件的 scrollable 视图。 |
protected class |
JScrollPane.ScrollBar
默认情况下, JScrollPane 创建的滚动条为此类的实例。 |
class |
JSeparator
JSeparator 为实现分隔线提供了一个通用组件 - 通常用作菜单项之间的分隔符,以便将菜单项分成几个逻辑组。 |
class |
JSlider
一个让用户以图形方式在有界区间内通过移动滑块来选择值的组件。 |
class |
JSpinner
让用户从一个有序序列中选择一个数字或者一个对象值的单行输入字段。 |
static class |
JSpinner.DateEditor
其模型为 SpinnerDateModel 的 JSpinner 编辑器。 |
static class |
JSpinner.DefaultEditor
一个针对非常特殊编辑器的简单基类,该类在 JFormattedTextField 中显示模型的当前值的只读视图。 |
static class |
JSpinner.ListEditor
其模型为 SpinnerListModel 的 JSpinner 编辑器。 |
static class |
JSpinner.NumberEditor
其模型为 SpinnerNumberModel 的 JSpinner 编辑器。 |
class |
JSplitPane
JSplitPane 用于分隔两个(只能两个)Component。 |
class |
JTabbedPane
一个组件,它允许用户通过单击具有给定标题和/或图标的选项卡,在一组组件之间进行切换。 |
class |
JTable
JTable 用来显示和编辑规则的二维单元表。 |
class |
JTextArea
JTextArea 是一个显示纯文本的多行区域。 |
class |
JTextField
JTextField 是一个轻量级组件,它允许编辑单行文本。 |
class |
JTextPane
& |