Uses of Class
java.awt.Component
-
Packages that use Component 软件包 描述 com.sun.java.accessibility.util 提供组成Java辅助功能实用程序的接口和类的集合。java.applet 提供创建applet所需的类以及applet用于与其applet上下文进行通信的类。java.awt 包含用于创建用户界面和绘制图形和图像的所有类。java.awt.dnd 拖放是在许多图形用户界面系统中发现的直接操纵手势,它提供了一种在逻辑上与GUI中的表示元素相关联的实体之间传递信息的机制。java.awt.event 提供用于处理AWT组件触发的不同类型事件的接口和类。java.awt.im 提供输入法框架的类和接口。java.beans 包含与开发 bean相关的类 - 基于JavaBeans架构的组件。java.beans.beancontext 提供与bean上下文相关的类和接口。javafx.embed.swing 提供一组在Swing应用程序中使用JavaFX的类。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 ),这是默认的外观和感觉。javax.swing.plaf.synth 合成是一种可以让所有绘画委托的外观和感觉。javax.swing.table 提供处理javax.swing.JTable
类和接口。javax.swing.text 提供处理可编辑和不可编辑文本组件的类和接口。javax.swing.text.html 提供HTMLEditorKit
类和支持类来创建HTML文本编辑器。javax.swing.tree 提供处理javax.swing.JTree
类和接口。 -
-
Uses of Component in com.sun.java.accessibility.util
Fields in com.sun.java.accessibility.util declared as Component Modifier and Type Field 描述 protected static Component
AWTEventMonitor. componentWithFocus
不推荐用于删除:此API元素将在以后的版本中被删除。此字段未使用; 使用getComponentWithFocus方法获取焦点的组件。Methods in com.sun.java.accessibility.util that return Component Modifier and Type 方法 描述 static Component
AWTEventMonitor. getComponentWithFocus()
返回当前具有键盘焦点的组件。 -
Uses of Component in java.applet
Subclasses of Component in java.applet Modifier and Type Class 描述 class
Applet
已过时。Applet API已被弃用。 有关详细信息,请参阅java.applet package documentation 。 -
Uses of Component in java.awt
Subclasses of Component in java.awt Modifier and Type Class 描述 class
Button
这个类创建一个标记的按钮。class
Canvas
Canvas
组件表示应用程序可以在其上绘制的屏幕的空白矩形区域,或者应用程序可以从中捕获来自用户的输入事件。class
Checkbox
复选框是可以处于“开”(true
)或“关”(false
)状态的图形组件。class
Choice
Choice
课程提供了一个弹出菜单的选择。class
Container
通用抽象窗口工具包(AWT)容器对象是可以包含其他AWT组件的组件。class
Dialog
Dialog是一个具有标题和边框的顶级窗口,通常用于从用户处采取某种形式的输入。class
FileDialog
FileDialog
类显示一个对话窗口,用户可以从中选择一个文件。class
Frame
AFrame
是一个标题和边框的顶级窗口。class
Label
ALabel
对象是用于将文本放置在容器中的组件。class
List
List
组件向用户显示文本项的滚动列表。class
Panel
Panel
是最简单的容器类。class
Scrollbar
Scrollbar
类体现了一个滚动条,一个熟悉的用户界面对象。class
ScrollPane
一个容器类,用于实现单个子组件的自动水平和/或垂直滚动。class
TextArea
一个TextArea
对象是一个显示文本的多行区域。class
TextComponent
TextComponent
类是允许编辑某些文本的任何组件的超类。class
TextField
TextField
对象是允许编辑单行文本的文本组件。class
Window
一个Window
对象是没有边框的顶级窗口,没有菜单栏。Fields in java.awt with type parameters of type Component Modifier and Type Field 描述 protected Hashtable<Component,GridBagConstraints>
GridBagLayout. comptable
这个散列表维护了一个组件与其gridbag约束之间的关联。Methods in java.awt that return Component Modifier and Type 方法 描述 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个组件。Component
ContainerOrderFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。abstract Component
FocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。Component
Component. getComponentAt(int x, int y)
确定此组件或其一个直接子组件是否包含( x , y )位置,如果是,则返回包含的组件。Component
Component. getComponentAt(Point p)
返回包含指定点的组件或子组件。Component
Container. getComponentAt(int x, int y)
找到包含x,y位置的组件。Component
Container. getComponentAt(Point p)
获取包含指定点的组件。Component
ContainerOrderFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。abstract Component
FocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。Component[]
Container. getComponents()
获取此容器中的所有组件。Component
ContainerOrderFocusTraversalPolicy. getDefaultComponent(Container aContainer)
返回要对焦的默认组件。abstract Component
FocusTraversalPolicy. getDefaultComponent(Container aContainer)
返回要对焦的默认组件。Component
ContainerOrderFocusTraversalPolicy. getFirstComponent(Container aContainer)
返回遍历周期中的第一个Component。abstract Component
FocusTraversalPolicy. getFirstComponent(Container aContainer)
返回遍历周期中的第一个Component。Component
KeyboardFocusManager. getFocusOwner()
如果焦点所有者与调用线程处于相同的上下文中,则返回焦点所有者。Component
Window. getFocusOwner()
如果此窗口被聚焦,则返回此窗口的具有焦点的子组件; 否则返回null。protected Component
KeyboardFocusManager. getGlobalFocusOwner()
即使调用线程与焦点所有者的上下文不同,返回焦点所有者。protected Component
KeyboardFocusManager. getGlobalPermanentFocusOwner()
返回永久焦点所有者,即使调用线程与永久焦点所有者处于不同的上下文中。Component
FocusTraversalPolicy. getInitialComponent(Window window)
返回当窗口第一次可见时应接收焦点的组件。Component
ContainerOrderFocusTraversalPolicy. getLastComponent(Container aContainer)
返回遍历周期中的最后一个组件。abstract Component
FocusTraversalPolicy. getLastComponent(Container aContainer)
返回遍历周期中的最后一个组件。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 1.1版开始,由getComponentAt(int,int)替换。Component
Container. locate(int x, int y)
已过时。从JDK 1.1版开始,由getComponentAt(int, int)
替代。Methods in java.awt with parameters of type Component Modifier and Type 方法 描述 protected boolean
ContainerOrderFocusTraversalPolicy. accept(Component aComponent)
确定组件是否是新焦点所有者的可接受选择。protected boolean
DefaultFocusTraversalPolicy. accept(Component aComponent)
确定组件是否是新焦点所有者的可接受选择。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)
将指定的组件添加到指定索引处的指定约束的容器中。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
BorderLayout. addLayoutComponent(Component comp, Object constraints)
使用指定的约束对象将指定的组件添加到布局。void
BorderLayout. addLayoutComponent(String name, Component comp)
已过时。替换为addLayoutComponent(Component, Object)
。void
CardLayout. addLayoutComponent(Component comp, Object constraints)
将指定的组件添加到此卡布局的内部名称表中。void
CardLayout. addLayoutComponent(String name, Component comp)
已过时。替换为addLayoutComponent(Component, Object)
。void
FlowLayout. addLayoutComponent(String name, Component comp)
将指定的组件添加到布局。void
GridBagLayout. addLayoutComponent(Component comp, Object constraints)
使用指定的constraints
对象将指定的组件添加到布局。void
GridBagLayout. addLayoutComponent(String name, Component comp)
没有效果,因为此布局管理器不使用每个组件字符串。void
GridLayout. addLayoutComponent(String name, Component comp)
将具有指定名称的指定组件添加到布局。void
LayoutManager. addLayoutComponent(String name, Component comp)
如果布局管理器使用每个组件字符串,则将组件comp
添加到布局,将其与由name
指定的字符串相关联。void
LayoutManager2. addLayoutComponent(Component comp, Object constraints)
使用指定的约束对象将指定的组件添加到布局。<T extends DragGestureRecognizer>
TToolkit. createDragGestureRecognizer(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
创建一个具体的,依赖平台的抽象DragGestureRecognizer类的子类,并将其与指定的DragSource,Component和DragGestureListener相关联。protected void
DefaultKeyboardFocusManager. dequeueKeyEvents(long after, Component untilFocused)
发布正常分派给当前焦点所有者的所有KeyEvents,由于调用具有相同时间戳和组件的enqueueKeyEvents
而排入队列。protected abstract void
KeyboardFocusManager. dequeueKeyEvents(long after, Component untilFocused)
由AWT调用以通知KeyboardFocusManager它应该取消KeyEvents的延迟调度。protected void
DefaultKeyboardFocusManager. discardKeyEvents(Component comp)
丢弃由于一次或enqueueKeyEvents
使用指定的组件或其后代调用enqueueKeyEvents
而排入队列的所有KeyEvent。protected abstract void
KeyboardFocusManager. discardKeyEvents(Component comp)
由AWT调用以通知KeyboardFocusManager它应该取消KeyEvents的延迟调度。protected void
DefaultKeyboardFocusManager. enqueueKeyEvents(long after, Component untilFocused)
延迟调度KeyEvents直到指定的Component成为焦点所有者。protected abstract void
KeyboardFocusManager. enqueueKeyEvents(long after, Component untilFocused)
由AWT调用,通知KeyboardFocusManager它应该延迟调度KeyEvents,直到指定的Component成为焦点所有者。void
DefaultKeyboardFocusManager. focusNextComponent(Component aComponent)
将组件聚焦在aComponent之后,通常基于FocusTraversalPolicy。abstract void
KeyboardFocusManager. focusNextComponent(Component aComponent)
将组件聚焦在aComponent之后,通常基于FocusTraversalPolicy。void
DefaultKeyboardFocusManager. focusPreviousComponent(Component aComponent)
在组件之前聚焦组件,通常基于FocusTraversalPolicy。abstract void
KeyboardFocusManager. focusPreviousComponent(Component aComponent)
在组件之前聚焦组件,通常基于FocusTraversalPolicy。Component
ContainerOrderFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。abstract Component
FocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。Component
ContainerOrderFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。abstract Component
FocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。int
Container. getComponentZOrder(Component comp)
返回容器内组件的z-order索引。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)
检索指定组件的约束。void
DefaultKeyboardFocusManager. processKeyEvent(Component focusedComponent, KeyEvent e)
当且仅当KeyEvent表示指定的focusComponent的焦点遍历键时,此方法启动焦点遍历操作。abstract void
KeyboardFocusManager. processKeyEvent(Component focusedComponent, KeyEvent e)
当且仅当KeyEvent表示指定的focusComponent的焦点遍历键时,此方法启动焦点遍历操作。void
KeyboardFocusManager. redispatchEvent(Component target, AWTEvent e)
重新分配AWTEvent,AWT事件调度程序将不会递归地请求KeyboardFocusManager或任何已安装的KeyEventDispatchers再次发送事件。void
Container. remove(Component comp)
从此容器中删除指定的组件。void
BorderLayout. removeLayoutComponent(Component comp)
从此边框布局中删除指定的组件。void
CardLayout. removeLayoutComponent(Component comp)
从布局中删除指定的组件。void
FlowLayout. removeLayoutComponent(Component comp)
从布局中删除指定的组件。void
GridBagLayout. removeLayoutComponent(Component comp)
从此布局中删除指定的组件。void
GridLayout. removeLayoutComponent(Component comp)
从布局中删除指定的组件。void
LayoutManager. 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位置显示弹出式菜单。void
DefaultKeyboardFocusManager. upFocusCycle(Component aComponent)
将焦点移动到一个焦点遍历周期。abstract void
KeyboardFocusManager. upFocusCycle(Component aComponent)
将焦点移动到一个焦点遍历周期。Constructors in java.awt with parameters of type Component Constructor 描述 MediaTracker(Component comp)
创建媒体跟踪器以跟踪给定组件的图像。 -
Uses of Component in java.awt.dnd
Fields in java.awt.dnd declared as Component Modifier and Type Field 描述 protected Component
DragGestureRecognizer. component
该Component
与此DragGestureRecognizer
相关联。Methods in java.awt.dnd that return Component Modifier and Type 方法 描述 Component
DragGestureEvent. getComponent()
返回Component
与此相关DragGestureEvent
。Component
DragGestureRecognizer. getComponent()
该方法返回Component
,由DragGestureRecognizer
“观察”用于拖动启动手势。Component
DragSourceContext. getComponent()
返回Component
与此相关DragSourceContext
。Component
DropTarget. getComponent()
获取Component
与此DropTarget
相关联。Component
DropTargetContext. getComponent()
此方法返回Component
与此相关DropTargetContext
。Methods in java.awt.dnd with parameters of type Component Modifier and Type 方法 描述 DragGestureRecognizer
DragSource. createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl)
创建一个新的DragGestureRecognizer
实现的默认抽象子类DragGestureRecognizer
这个DragSource
,并设置指定Component
和DragGestureListener
新创建的对象上。<T extends DragGestureRecognizer>
TDragSource. createDragGestureRecognizer(Class<T> recognizerAbstractClass, Component c, int actions, DragGestureListener dgl)
创建一个新的DragGestureRecognizer
,实现指定的抽象子类DragGestureRecognizer
,并在新创建的对象上设置指定的Component
和DragGestureListener
。protected DropTarget.DropTargetAutoScroller
DropTarget. createDropTargetAutoScroller(Component c, Point p)
创建一个嵌入式自动推送器void
DragGestureRecognizer. setComponent(Component c)
将DragGestureRecognizer与registerListeners()和unregisterListeners()相关联的组件设置为适当的副作用。void
DropTarget. setComponent(Component c)
注意:此接口需要允许以两种方式之一安全地将DropTarget与组件关联:component.setDropTarget(droptarget);
或droptarget.setComponent(component);
Constructors in java.awt.dnd with parameters of type Component Constructor 描述 DragGestureRecognizer(DragSource ds, Component c)
构建一个新的DragGestureRecognizer
给出DragSource
用于此拖放操作,而Component
这个DragGestureRecognizer
应该“观察”拖动启动手势。DragGestureRecognizer(DragSource ds, Component c, int sa)
构造一个新的DragGestureRecognizer
给定DragSource
以在此拖放操作中使用,Component
这个DragGestureRecognizer
应该“观察”用于拖动启动手势,以及此拖放操作支持的操作。DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)
构造一个新的DragGestureRecognizer
给定DragSource
用于这个拖放操作,Component
这个DragGestureRecognizer
应该“观察”拖动启动手势,这个拖放操作支持的动作,以及DragGestureListener
通知一次已经检测到拖动启动手势。DropTarget(Component c, int ops, DropTargetListener dtl)
创建一个DropTarget
给出了Component
来关联自己,一个int
表示默认可接受的操作支持,一个DropTargetListener
处理事件处理。DropTarget(Component c, int ops, DropTargetListener dtl, boolean act)
创建一个DropTarget
给出Component
以关联自己,一个int
表示默认可接受的动作以支持,一个DropTargetListener
来处理事件处理,以及一个boolean
指示DropTarget
是否正在接受丢弃。DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)
创建一个新的DropTarget,给出了Component
与自己相关联,一个int
表示默认可接受的动作来支持,一个DropTargetListener
处理事件处理,一个boolean
指示DropTarget
是否正在接受丢弃,以及一个FlavorMap
使用(或null为默认值FlavorMap
)。DropTarget(Component c, DropTargetListener dtl)
创建一个DropTarget
给予Component
来关联自己,和DropTargetListener
来处理事件处理。DropTargetAutoScroller(Component c, Point p)
构建一个DropTargetAutoScrollerMouseDragGestureRecognizer(DragSource ds, Component c)
构造一个新的MouseDragGestureRecognizer
给出DragSource
为Component
c和Component
观察。MouseDragGestureRecognizer(DragSource ds, Component c, int act)
构造一个新的MouseDragGestureRecognizer
给出DragSource
为Component
c,Component
观察,并允许这种拖动操作的动作。MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl)
构造一个新的MouseDragGestureRecognizer
给予DragSource
为Component
c,Component
观察,这个拖动操作允许的动作,以及DragGestureListener
通知何时检测到拖动手势。 -
Uses of Component in java.awt.event
Methods in java.awt.event that return Component Modifier and Type 方法 描述 Component
HierarchyEvent. getChanged()
返回已更改的层次结构顶部的组件。Component
ContainerEvent. getChild()
返回受事件影响的组件。Component
ComponentEvent. getComponent()
返回事件的发起者。Component
HierarchyEvent. getComponent()
返回事件的发起者。Component
FocusEvent. getOppositeComponent()
返回此焦点更改中涉及的其他组件。Constructors in java.awt.event with parameters of type Component Constructor 描述 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
和Cause.UNKNOWN
原因。FocusEvent(Component source, int id, boolean temporary, Component opposite, FocusEvent.Cause cause)
构造一个具有指定临时状态的FocusEvent
对象,Component
的原因为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, long when, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
构造具有指定源组件,类型,时间,文本,插入符和InputMethodEvent
。InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)
构造具有指定源组件,类型,插入符号和InputMethodEvent
。InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
构造具有指定的源组件,类型,文本,插入符和InputMethodEvent
。KeyEvent(Component source, int id, long when, int modifiers, int keyCode)
已过时。截至JDK1.1; 改用KeyEvent(Component, int, long, int, int, char)
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)
构造一个KeyEvent
对象。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
对象。MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, 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
对象。MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation)
构造具有指定的源组件,类型,修饰符,坐标,绝对坐标,滚动类型,滚动量和轮子旋转的MouseWheelEvent
对象。MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation, double preciseWheelRotation)
构造具有指定的源组件,类型,修饰符,坐标,绝对坐标,滚动类型,滚动量和轮子旋转的MouseWheelEvent
对象。PaintEvent(Component source, int id, Rectangle updateRect)
使用指定的源组件和类型构造一个PaintEvent
对象。 -
Uses of Component in java.awt.im
Methods in java.awt.im with parameters of type Component Modifier and Type 方法 描述 void
InputContext. removeNotify(Component client)
通知输入上下文,客户端组件已从其包含层次结构中删除,或该组件已禁用输入法支持。 -
Uses of Component in java.beans
Methods in java.beans that return Component Modifier and Type 方法 描述 Component
PropertyEditor. getCustomEditor()
PropertyEditor可以选择提供编辑其属性值的完整自定义组件。Component
PropertyEditorSupport. getCustomEditor()
PropertyEditor可以选择提供编辑其属性值的完整自定义组件。 -
Uses of Component in java.beans.beancontext
Methods in java.beans.beancontext that return Component Modifier and Type 方法 描述 Component
BeanContextChildComponentProxy. getComponent()
获取java.awt.Component
相关联的BeanContextChild
。 -
Uses of Component in javafx.embed.swing
Subclasses of Component in javafx.embed.swing Modifier and Type Class 描述 class
JFXPanel
JFXPanel
是将JavaFX内容嵌入到Swing应用程序中的组件。 -
Uses of Component in javax.swing
Classes in javax.swing with type parameters of type Component Modifier and Type Class 描述 class
JLayer<V extends Component>
JLayer
是用于Swing组件的通用装饰器,可以实现各种先进的绘画效果,并且可以接收在其边框内生成的所有AWTEvent
的通知。Subclasses of Component in javax.swing Modifier and Type Class 描述 class
AbstractButton
定义按钮和菜单项的常见行为。class
Box
一个使用BoxLayout对象作为其布局管理器的轻量级容器。static class
Box.Filler
参与布局但没有视图的轻量级组件的实现。class
CellRendererPane
此类插入到单元格渲染器和使用它们的组件之间。class
DefaultListCellRenderer
渲染列表中的项目。static class
DefaultListCellRenderer.UIResource
实现UIResource的DefaultListCellRenderer的子类。class
JApplet
已过时。Applet API已被弃用。 有关详细信息,请参阅java.applet package documentation 。class
JButton
实现“推”按钮。class
JCheckBox
复选框的实现 - 可以选择或取消选择的项目,并向用户显示其状态。class
JCheckBoxMenuItem
可以选择或取消选择的菜单项。class
JColorChooser
JColorChooser
提供了一个设计为允许用户操纵和选择颜色的控件窗格。class
JComboBox<E>
组合按钮或可编辑字段和下拉列表的组件。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
JLayer<V extends Component>
JLayer
是用于Swing组件的通用装饰器,可以实现各种先进的绘画效果,并且可以接收在其边框内生成的所有AWTEvent
的通知。class
JLayeredPane
JLayeredPane
增加了JFC / Swing容器的深度,允许组件在需要时重叠。class
JList<E>
显示对象列表并允许用户选择一个或多个项目的组件。class
JMenu
一个菜单的实现 - 一个包含JMenuItem
s的弹出窗口,当用户在JMenuBar
上选择一个项目时JMenuBar
。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
提供轻量级组件的可滚动视图。protected class
JScrollPane.ScrollBar
默认情况下,JScrollPane
创建作为此类的实例的滚动条。class
JSeparator
JSeparator
提供了一种用于实现分割线的通用组件 - 通常用作将其分解为逻辑分组的菜单项之间的分隔符。class
JSlider
允许用户通过在有界间隔内滑动旋钮图形地选择值的组件。class
JSpinner
单行输入字段,允许用户从有序序列中选择一个数字或一个对象值。static class
JSpinner.DateEditor
JSpinner
的编辑器,型号为SpinnerDateModel
。static class
JSpinner.DefaultEditor
更专业的编辑器的简单基类,可以使用JFormattedTextField
显示模型当前值的JFormattedTextField
。static class
JSpinner.ListEditor
一个JSpinner
的编辑器,其型号是SpinnerListModel
。static class
JSpinner.NumberEditor
一个JSpinner
的编辑器,其型号是SpinnerNumberModel
。class
JSplitPane
JSplitPane
用于划分两个(也只有两个)Component
s。class
JTabbedPane
通过点击具有给定标题和/或图标的选项卡,用户可以在一组组件之间切换的组件。class
JTable
JTable
用于显示和编辑单元格的常规二维表。class
JTextArea
AJTextArea
是显示纯文本的多行区域。class
JTextField
JTextField
是一个轻量级组件,允许编辑单行文本。class
JTextPane
可以用图形化的属性标记的文本组件。class
JToggleButton
一个两状态按钮的实现。class
JToolBar
JToolBar
提供了一个组件,可用于显示常用的Action
或控件。static class
JToolBar.Separator
工具栏特定的分隔符。class
JToolTip
用于显示组件的“提示”。class
JTree
class
JViewport
您可以通过它查看基础信息的“视口”或“舷窗”。class
JWindow
AJWindow
是可以在用户桌面上的任何位置显示的容器。Fields in javax.swing declared as Component Modifier and Type Field 描述 protected static Component
ImageIcon. component
已过时。自1.8protected Component
JTable. editorComp
如果编辑,Component
正在处理编辑。protected Component
JRootPane. glassPane
玻璃窗格覆盖菜单栏和内容窗格,因此可以拦截鼠标移动等。protected Component
JLabel. labelFor
该标签用于 如果标签不是组件的标签,则为nullprotected Component
JSplitPane. leftComponent
左或顶部组件。protected Component
JScrollPane. lowerLeft
要显示在左下角的组件。protected Component
ScrollPaneLayout. lowerLeft
要显示在左下角的组件。protected Component
JScrollPane. lowerRight
要显示在右下角的组件。protected Component
ScrollPaneLayout. lowerRight
要显示在右下角的组件。protected Component
JSplitPane. rightComponent
右侧或底部组件。protected Component
JScrollPane. upperLeft
组件显示在左上角。protected Component
ScrollPaneLayout. upperLeft
组件显示在左上角。protected Component
JScrollPane. upperRight
组件显示在右上角。protected Component
ScrollPaneLayout. upperRight
组件显示在右上角。Methods in javax.swing that return Component Modifier and Type 方法 描述 Component
JMenu. add(Component c)
将一个组件附加到此菜单的末尾。Component
JMenu. add(Component c, int index)
在给定的位置将指定的组件添加到此容器。Component
JTabbedPane. add(Component component)
添加一个component
与选项卡标题默认为组件的名称,这是调用component.getName
的结果。Component
JTabbedPane. add(Component component, int index)
在指定的选项卡索引处添加一个component
,其中的选项卡标题默认为组件的名称。Component
JTabbedPane. add(String title, Component component)
添加一个component
与指定的选项卡标题。protected Component
ScrollPaneLayout. addSingletonComponent(Component oldC, Component newC)
删除现有组件。Component
MenuSelectionManager. componentForPoint(Component source, Point sourcePoint)
返回当前所选路径中包含sourcePoint的组件。protected Component
JRootPane. createGlassPane()
由构造函数调用方法创建默认glassPane
。static Component
Box. createGlue()
创建一个不可见的“胶水”组件,可在Box中使用,其可见组件具有最大宽度(对于水平框)或高度(对于垂直框)。static Component
Box. createHorizontalGlue()
创建水平胶水组件。static Component
Box. createHorizontalStrut(int width)
创建一个看不见的,固定宽度的组件。static Component
Box. createRigidArea(Dimension d)
创建一个总是指定大小的不可见组件。static Component
Box. createVerticalGlue()
创建垂直胶水组件。static Component
Box. createVerticalStrut(int height)
创建一个看不见的,固定高度的组件。static Component
SwingUtilities. findFocusOwner(Component c)
已过时。截至1.4,由KeyboardFocusManager.getFocusOwner()
替代。Component
JSplitPane. getBottomComponent()
返回下面的组件或分隔符的右侧。Component
DefaultCellEditor. getComponent()
返回对编辑器组件的引用。Component
JMenu. getComponent()
返回java.awt.Component
用于绘制这个MenuElement
。Component
JMenuBar. getComponent()
实现为MenuElement
。Component
JMenuItem. getComponent()
返回用于绘制此对象的java.awt.Component
。Component
JPopupMenu. getComponent()
返回此JPopupMenu
组件。Component
MenuElement. getComponent()
此方法应返回用于绘制接收元素的java.awt.Component
。Component
Renderer. getComponent()
返回用于渲染值的组件。Component
TransferHandler.TransferSupport. getComponent()
返回此传输的目标组件。Component
DefaultFocusManager. getComponentAfter(Container aContainer, Component aComponent)
返回之后的组件。Component
LayoutFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。Component
SortingFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。Component
JTabbedPane. getComponentAt(int index)
返回组件index
。Component
JMenuBar. getComponentAtIndex(int i)
已过时。替换为getComponent(int i)
Component
JPopupMenu. getComponentAtIndex(int i)
已过时。Component
JToolBar. getComponentAtIndex(int i)
返回指定索引处的组件。Component
DefaultFocusManager. getComponentBefore(Container aContainer, Component aComponent)
返回之前的组件。Component
LayoutFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。Component
SortingFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。Component[]
JLayeredPane. getComponentsInLayer(int layer)
返回指定图层中的组件数组。Component
JScrollPane. getCorner(String key)
返回指定角落的组件。Component
ScrollPaneLayout. getCorner(String key)
返回指定角落处的Component
。protected Component
JTable.AccessibleJTable.AccessibleJTableCell. getCurrentComponent()
获取表单元格渲染器组件。static Component
SwingUtilities. getDeepestComponentAt(Component parent, int x, int y)
返回的最深可见后代组件parent
包含位置x
,y
。Component
SortingFocusTraversalPolicy. getDefaultComponent(Container aContainer)
返回要对焦的默认组件。Component
ComboBoxEditor. getEditorComponent()
返回应该添加到该编辑器的树层次结构中的组件Component
JTable. getEditorComponent()
返回处理编辑会话的组件。Component
DefaultFocusManager. getFirstComponent(Container aContainer)
返回第一个组件。Component
LayoutFocusTraversalPolicy. getFirstComponent(Container aContainer)
返回遍历周期中的第一个Component。Component
SortingFocusTraversalPolicy. getFirstComponent(Container aContainer)
返回遍历周期中的第一个Component。Component
JInternalFrame. getFocusOwner()
如果此JInternalFrame
处于活动状态,则返回具有焦点的小孩。Component
JApplet. getGlassPane()
已过时。返回此applet的glassPane对象。Component
JDialog. getGlassPane()
返回此对话框的glassPane
对象。Component
JFrame. getGlassPane()
返回此帧的glassPane
对象。Component
JInternalFrame. getGlassPane()
返回此内部框架的玻璃窗格。Component
JRootPane. getGlassPane()
返回此JRootPane
的当前玻璃窗格。Component
JWindow. getGlassPane()
返回此窗口的glassPane Component
。Component
RootPaneContainer. getGlassPane()
返回glassPane。Component
InternalFrameFocusTraversalPolicy. getInitialComponent(JInternalFrame frame)
返回当第一次选择JInternalFrame时应该接收焦点的组件。Component
JPopupMenu. getInvoker()
返回该弹出菜单的“调用者”组件。Component
JLabel. getLabelFor()
获取此标签的组件。Component
DefaultFocusManager. getLastComponent(Container aContainer)
返回最后一个组件。Component
LayoutFocusTraversalPolicy. getLastComponent(Container aContainer)
返回遍历周期中的最后一个组件。Component
SortingFocusTraversalPolicy. getLastComponent(Container aContainer)
返回遍历周期中的最后一个组件。Component
JSplitPane. getLeftComponent()
将分量返回到左侧(或上方)。Component
DefaultListCellRenderer. getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Component
ListCellRenderer. getListCellRendererComponent(JList<? extends E> list, E value, int index, boolean isSelected, boolean cellHasFocus)
返回已配置为显示指定值的组件。Component
JMenu. getMenuComponent(int n)
返回位置n
的组件。Component[]
JMenu. getMenuComponents()
返回菜单的子组件的数组Component
。Component
JInternalFrame. getMostRecentFocusOwner()
返回此JInternalFrame
的子组件,当选择此JInternalFrame
时,该组件将接收焦点。Component
JComponent. getNextFocusableComponent()
已过时。截至1.4,由FocusTraversalPolicy
取代。Component
JSplitPane. getRightComponent()
将分量返回到右侧(或更低)。static Component
SwingUtilities. getRoot(Component c)
返回当前组件树的根组件。Component
JTabbedPane. getSelectedComponent()
返回此选项卡窗格当前选定的组件。Component
JTabbedPane. getTabComponentAt(int index)
返回标签组件index
。Component
DefaultCellEditor. getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
实现TableCellEditor
界面。Component
JSplitPane. getTopComponent()
返回上面的组件,或者分隔符的左边。Component
DefaultCellEditor. getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
实现TreeCellEditor
接口。static Component
SwingUtilities. getUnwrappedView(JViewport viewport)
返回不是JLayer
的实例的第一个JViewport
的后代。Component
JViewport. getView()
返回JViewport
的一个孩子或null
。Component
JTable. prepareEditor(TableCellEditor editor, int row, int column)
准备通过在查询的单元格的值和选择状态数据模型中的编辑器row
,column
。Component
JTable. prepareRenderer(TableCellRenderer renderer, int row, int column)
通过在查询的单元格的值和选择状态的数据模型来准备渲染器row
,column
。Methods in javax.swing that return types with arguments of type Component Modifier and Type 方法 描述 protected Comparator<? super Component>
SortingFocusTraversalPolicy. getComparator()
返回将用于在焦点遍历循环中对“组件”进行排序的“比较器”。protected Hashtable<Component,Integer>
JLayeredPane. getComponentToLayer()
返回将组件映射到图层的散列表。Methods in javax.swing with parameters of type Component Modifier and Type 方法 描述 protected boolean
LayoutFocusTraversalPolicy. accept(Component aComponent)
确定指定的Component
是否是新焦点所有者的可接受的选择。protected boolean
SortingFocusTraversalPolicy. accept(Component aComponent)
确定组件是否是新焦点所有者的可接受选择。Component
JMenu. add(Component c)
将一个组件附加到此菜单的末尾。Component
JMenu. add(Component c, int index)
在给定的位置将指定的组件添加到此容器。Component
JTabbedPane. add(Component component)
添加一个component
与选项卡标题默认为组件的名称,这是调用component.getName
的结果。Component
JTabbedPane. add(Component component, int index)
在指定的选项卡索引中添加一个component
,其中的选项卡标题默认为组件的名称。void
JTabbedPane. add(Component component, Object constraints)
在标签窗格中添加一个component
。void
JTabbedPane. add(Component component, Object constraints, int index)
在指定的选项卡索引中添加一个component
。Component
JTabbedPane. add(String title, Component component)
添加一个component
与指定的选项卡标题。GroupLayout.Group
GroupLayout.Group. addComponent(Component component)
添加一个Component
到这个Group
。GroupLayout.Group
GroupLayout.Group. addComponent(Component component, int min, int pref, int max)
添加一个Component
到这个Group
与指定的大小。GroupLayout.ParallelGroup
GroupLayout.ParallelGroup. addComponent(Component component)
添加一个Component
这个Group
。GroupLayout.ParallelGroup
GroupLayout.ParallelGroup. addComponent(Component component, int min, int pref, int max)
添加一个Component
到这个Group
与指定的大小。GroupLayout.ParallelGroup
GroupLayout.ParallelGroup. addComponent(Component component, GroupLayout.Alignment alignment)
添加一个Component
到这个ParallelGroup
与指定的对齐。GroupLayout.ParallelGroup
GroupLayout.ParallelGroup. addComponent(Component component, GroupLayout.Alignment alignment, int min, int pref, int max)
添加一个Component
到这个ParallelGroup
与指定的对齐和大小。GroupLayout.SequentialGroup
GroupLayout.SequentialGroup. addComponent(boolean useAsBaseline, Component component)
添加一个Component
这个Group
。GroupLayout.SequentialGroup
GroupLayout.SequentialGroup. addComponent(boolean useAsBaseline, Component component, int min, int pref, int max)
添加一个Component
到这个Group
与指定的大小。GroupLayout.SequentialGroup
GroupLayout.SequentialGroup. addComponent(Component component)
添加一个Component
这个Group
。GroupLayout.SequentialGroup
GroupLayout.SequentialGroup. addComponent(Component component, int min, int pref, int max)
添加一个Component
到这个Group
与指定的大小。protected void
AbstractButton. addImpl(Component comp, Object constraints, int index)
将指定的组件添加到指定索引的此容器中,有关此方法的完整说明,请参阅Container.addImpl(Component, Object, int)
。protected void
CellRendererPane. addImpl(Component x, Object constraints, int index)
如果指定的组件已经是一个小孩,那么我们不用担心任何事情 - 堆栈顺序对于单元格渲染器组件并不重要(CellRendererPane不会绘制)。protected void
JApplet. addImpl(Component comp, Object constraints, int index)
已过时。添加指定的小孩Component
。protected void
JDesktopPane. addImpl(Component comp, Object constraints, int index)
在指定的索引处将指定的组件添加到此容器。protected void
JDialog. addImpl(Component comp, Object constraints, int index)
添加指定的小孩Component
。protected void
JFrame. addImpl(Component comp, Object constraints, int index)
添加指定的小孩Component
。protected void
JInternalFrame. addImpl(Component comp, Object constraints, int index)
添加指定的小孩Component
。protected void
JLayer. addImpl(Component comp, Object constraints, int index)
JLayer
不支持此方法,并始终抛出UnsupportedOperationException
protected void
JLayeredPane. addImpl(Component comp, Object constraints, int index)
protected void
JRootPane. addImpl(Component comp, Object constraints, int index)
覆盖以执行玻璃部件的位置作为零子。protected void
JSplitPane. addImpl(Component comp, Object constraints, int index)
将指定的组件添加到此拆分窗格。protected void
JToolBar. addImpl(Component comp, Object constraints, int index)
如果添加了一个JButton
,它最初设置为禁用。protected void
JViewport. addImpl(Component child, Object constraints, int index)
设置JViewport
的一个轻量级的小孩,可以是null
。protected void
JWindow. addImpl(Component comp, Object constraints, int index)
添加指定的小孩Component
。void
BoxLayout. addLayoutComponent(Component comp, Object constraints)
本课不使用void
BoxLayout. addLayoutComponent(String name, Component comp)
本课不使用void
GroupLayout. addLayoutComponent(Component component, Object constraints)
通知已将Component
添加到父容器。void
GroupLayout. addLayoutComponent(String name, Component component)
通知已将Component
添加到父容器。void
JRootPane.RootLayout. addLayoutComponent(Component comp, Object constraints)
void
JRootPane.RootLayout. addLayoutComponent(String name, Component comp)
void
JSpinner.DefaultEditor. addLayoutComponent(String name, Component child)
这个LayoutManager
方法什么都不做。void
OverlayLayout. addLayoutComponent(Component comp, Object constraints)
使用指定的约束对象将指定的组件添加到布局。void
OverlayLayout. addLayoutComponent(String name, Component comp)
将指定的组件添加到布局。void
ScrollPaneLayout. addLayoutComponent(String s, Component c)
将指定的组件添加到布局。void
SpringLayout. addLayoutComponent(Component component, Object constraints)
如果constraints
是constraints
的实例,SpringLayout.Constraints
约束与指定的组件关联。void
SpringLayout. addLayoutComponent(String name, Component c)
没有效果,因为此布局管理器不使用每个组件字符串。void
ViewportLayout. addLayoutComponent(String name, Component c)
将指定的组件添加到布局。protected Component
ScrollPaneLayout. addSingletonComponent(Component oldC, Component newC)
删除现有组件。void
JTabbedPane. addTab(String title, Component component)
添加由component
代表的title
,没有图标。void
JTabbedPane. addTab(String title, Icon icon, Component component)
添加一个由title
和/或component
表示的icon
,其中的一个可以是null
。void
JTabbedPane. addTab(String title, Icon icon, Component component, String tip)
增加了一个component
和tip
由a表示title
和/或icon
,其中任一个可以是null
。boolean
DefaultFocusManager. compareTabOrder(Component a, Component b)
通过焦点遍历循环顺序对组件进行比较。Component
MenuSelectionManager. componentForPoint(Component source, Point sourcePoint)
返回当前所选路径中包含sourcePoint的组件。static MouseEvent
SwingUtilities. convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination)
返回类似于sourceEvent
的MouseEvent,除了其x和y成员已转换为destination
的坐标系。static Point
SwingUtilities. convertPoint(Component source, int x, int y, Component destination)
将source
坐标系中的点(x,y)
转换为destination
坐标系。static Point
SwingUtilities. convertPoint(Component source, Point aPoint, Component destination)
转换为aPoint
在source
坐标系destination
坐标系。static void
SwingUtilities. convertPointFromScreen(Point p, Component c)
将一个点从屏幕坐标转换为组件的坐标系static void
SwingUtilities. convertPointToScreen(Point p, Component c)
将点从组件的坐标系转换为屏幕坐标。static Rectangle
SwingUtilities. convertRectangle(Component source, Rectangle aRectangle, Component destination)
将source
坐标系中的矩形aRectangle
转换为destination
坐标系。static JDialog
JColorChooser. createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener)
创建并返回一个包含指定的ColorChooser
窗格的新对话框以及“确定”,“取消”和“重置”按钮。protected JDialog
JFileChooser. createDialog(Component parent)
创建并返回一个新的JDialog
包装this
居中于parent
在parent
的帧。JDialog
JOptionPane. createDialog(Component parentComponent, String title)
创建并返回一个新的JDialog
包装this
居中于parentComponent
在parentComponent
的帧。JInternalFrame
JOptionPane. createInternalFrame(Component parentComponent, String title)
创建并返回一个JInternalFrame
的实例。static RepaintManager
RepaintManager. currentManager(Component c)
返回给定组件的调用线程的RepaintManager。static Component
SwingUtilities. findFocusOwner(Component c)
已过时。截至1.4,由KeyboardFocusManager.getFocusOwner()
取代。static Accessible
SwingUtilities. getAccessibleAt(Component c, Point p)
返回包含在本地坐标Point
中的Accessible
子Point
(如果存在)。static Accessible
SwingUtilities. getAccessibleChild(Component c, int i)
返回对象的第n个可访问子对象。static int
SwingUtilities. getAccessibleChildrenCount(Component c)
返回对象中可访问的子项数。static int
SwingUtilities. getAccessibleIndexInParent(Component c)
在其可访问的父项中获取此对象的索引。static AccessibleStateSet
SwingUtilities. getAccessibleStateSet(Component c)
获取此对象的状态。static Container
SwingUtilities. getAncestorNamed(String name, Component comp)
在组件层次结构中搜索comp
以上的方便方法,并返回其找到的第一个对象name
。static Container
SwingUtilities. getAncestorOfClass(Class<?> c, Component comp)
以上搜索的便捷方法comp
组件层次结构中,并返回类的第一个目的c
它找到。Component
DefaultFocusManager. getComponentAfter(Container aContainer, Component aComponent)
返回之后的组件。Component
LayoutFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。Component
SortingFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)
返回在aComponent之后应该接收焦点的Component。Component
DefaultFocusManager. getComponentBefore(Container aContainer, Component aComponent)
返回之前的组件。Component
LayoutFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。Component
SortingFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)
返回应该在aComponent之前接收焦点的Component。int
JMenuBar. getComponentIndex(Component c)
返回指定组件的索引。int
JPopupMenu. getComponentIndex(Component c)
返回指定组件的索引。int
JToolBar. getComponentIndex(Component c)
返回指定组件的索引。Spring
SpringLayout. getConstraint(String edgeName, Component c)
返回控制组件的指定边缘与其父级的顶部或左侧边缘之间的距离的弹簧。SpringLayout.Constraints
SpringLayout. getConstraints(Component c)
返回指定组件的约束。static Component
SwingUtilities. getDeepestComponentAt(Component parent, int x, int y)
返回的最深可见后代组件parent
包含位置x
,y
。static JDesktopPane
JOptionPane. getDesktopPaneForComponent(Component parentComponent)
返回指定组件的桌面窗格。static Frame
JOptionPane. getFrameForComponent(Component parentComponent)
返回指定的组件的Frame
。int
JLayeredPane. getIndexOf(Component c)
返回指定Component的索引。int
JLayeredPane. getLayer(Component c)
返回指定Component的layer属性。static JLayeredPane
JLayeredPane. getLayeredPaneAbove(Component c)
方便方法返回包含指定组件的第一个JLayeredPane。static Rectangle
SwingUtilities. getLocalBounds(Component aComponent)
返回组件aComponent
的矩形(0,0,bounds.width,bounds.height)Image
RepaintManager. getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)
返回应使用组件c
作为双缓冲区的屏幕外缓冲区。Popup
PopupFactory. getPopup(Component owner, Component contents, int x, int y)
创建Popup
为组件owner
包含Componentcontents
。protected Popup
PopupFactory. getPopup(Component owner, Component contents, int x, int y, boolean isHeavyWeightPopup)
创建Popup
为组件owner
包含Componentcontents
。int
JLayeredPane. getPosition(Component c)
获取组件在其层内的相对位置。static Component
SwingUtilities. getRoot(Component c)
返回当前组件树的根组件。static JRootPane
SwingUtilities. getRootPane(Component c)
如果c是JRootPane后代,则返回其JRootPane祖先。static Container
SwingUtilities. getUnwrappedParent(Component component)
返回component
的第一个祖先,而不是JLayer
的一个实例。Image
RepaintManager. getVolatileOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)
返回一个挥发性的屏幕外缓冲区,应该用作具有指定组件c
的双缓冲区。static Window
SwingUtilities. getWindowAncestor(Component c)
返回第Window
祖先c
,或null
如果c
未包含在里面Window
。static Spring
Spring. height(Component c)
返回一个弹簧,其 最小值 , 首选 值 , 最大值和 值属性由所提供组件的 minimumSize , preferredSize , maximumSize和 size属性的高度定义。int
JTabbedPane. indexOfComponent(Component component)
返回指定组件的选项卡的索引。int
JTabbedPane. indexOfTabComponent(Component tabComponent)
返回指定选项卡组件的选项卡的索引。void
JPopupMenu. insert(Component component, int index)
将指定的组件插入到给定位置的菜单中。void
JTextPane. insertComponent(Component c)
将组件插入到文档中作为当前所选内容的替代。void
JTabbedPane. insertTab(String title, Icon icon, Component component, String tip, int index)
在给定的索引处插入给定组件的新选项卡,由给定的标题和/或图标表示,其中任一个可能为null
。boolean
MenuSelectionManager. isComponentPartOfCurrentMenu(Component c)
如果c
是当前使用的菜单的一部分,则返回truestatic boolean
SwingUtilities. isDescendingFrom(Component a, Component b)
如果组件a
从组件b
true
则返回b
static boolean
JComponent. isLightweightComponent(Component c)
如果此组件是轻量级的,则返回true,也就是说,如果该组件没有本机窗口系统对等体,则返回true。boolean
JMenu. isMenuComponent(Component c)
如果指定的组件存在于子菜单层次结构中,则返回true。void
GroupLayout. linkSize(int axis, Component... components)
强制指定的组件沿指定的轴具有相同的大小,而不管其首选,最小或最大尺寸。void
GroupLayout. linkSize(Component... components)
强制指定的组件具有相同的大小,无论其首选,最小或最大大小如何。void
JLayeredPane. moveToBack(Component c)
将组件移动到当前层中的组件底部(位置-1)。void
JLayeredPane. moveToFront(Component c)
将组件移动到当前层(位置0)中组件的顶部。void
CellRendererPane. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
调用this.paintComponent(g,c,p,x,y,w,h,false)。void
CellRendererPane. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
在图形对象上绘制单元格渲染器组件c。void
CellRendererPane. paintComponent(Graphics g, Component c, Container p, Rectangle r)
调用this.paintComponent()与矩形x,y,width,height字段。static void
SwingUtilities. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
绘制一个组件到指定的Graphics
。static void
SwingUtilities. paintComponent(Graphics g, Component c, Container p, Rectangle r)
将组件绘制到指定的Graphics
。void
Icon. paintIcon(Component c, Graphics g, int x, int y)
在指定位置绘制图标。void
ImageIcon. paintIcon(Component c, Graphics g, int x, int y)
画图标。void
LookAndFeel. provideErrorFeedback(Component component)
当用户尝试无效操作时调用,例如粘贴到具有焦点的不可编辑的JTextField
中。void
SpringLayout. putConstraint(String e1, Component c1, int pad, String e2, Component c2)
链接边缘e1
组分c1
到边缘e2
组分c2
,边与边之间的距离固定。void
SpringLayout. putConstraint(String e1, Component c1, Spring s, String e2, Component c2)
链接边缘e1
组分c1
到边缘e2
组分c2
。void
JApplet. remove(Component comp)
已过时。从容器中删除指定的组件。void
JDesktopPane. remove(Component comp)
从此容器中删除指定的组件。void
JDialog. remove(Component comp)
从容器中删除指定的组件。void
JFrame. remove(Component comp)
从容器中删除指定的组件。void
JInternalFrame. remove(Component comp)
从容器中删除指定的组件。void
JLayer. remove(Component comp)
从此容器中删除指定的组件。void
JMenu. remove(Component c)
从此菜单中删除组件c
。void
JSplitPane. remove(Component component)
从窗格中删除子组件component
。void
JTabbedPane. remove(Component component)
删除指定Component
从JTabbedPane
。void
JViewport. remove(Component child)
删除Viewport
的一个轻量级的孩子。void
JWindow. remove(Component comp)
从容器中删除指定的组件。void
BoxLayout. removeLayoutComponent(Component comp)
本课不使用void
GroupLayout. removeLayoutComponent(Component component)
通知已从父容器中删除Component
。void
JRootPane.RootLayout. removeLayoutComponent(Component comp)
void
JSpinner.DefaultEditor. removeLayoutComponent(Component child)
这个LayoutManager
方法什么都不做。void
OverlayLayout. removeLayoutComponent(Component comp)
从布局中删除指定的组件。void
ScrollPaneLayout. removeLayoutComponent(Component c)
从布局中删除指定的组件。void
SpringLayout. removeLayoutComponent(Component c)
删除与指定组件关联的约束。void
ViewportLayout. removeLayoutComponent(Component c)
从布局中删除指定的组件。void
GroupLayout. replace(Component existingComponent, Component newComponent)
用新的组件代替现有组件。void
JSplitPane. setBottomComponent(Component comp)
设置下面的分量,或分配器的右侧。void
JScrollPane. setColumnHeaderView(Component view)
如果需要,创建列标题视口,设置其视图,然后将列标题视口添加到滚动页面。void
JTabbedPane. setComponentAt(int index, Component component)
将组件设置为index
至component
。void
JDesktopPane. setComponentZOrder(Component comp, int index)
将指定的组件移动到容器中指定的z顺序索引。void
JScrollPane. setCorner(String key, Component corner)
添加一个孩子,出现在一个滚动窗格的角落,如果有空间。void
JApplet. setGlassPane(Component glassPane)
已过时。设置glassPane属性。void
JDialog. setGlassPane(Component glassPane)
设置glassPane
属性。void
JFrame. setGlassPane(Component glassPane)
设置glassPane
属性。void
JInternalFrame. setGlassPane(Component glass)
设置这个JInternalFrame
的glassPane
属性。void
JRootPane. setGlassPane(Component glass)
将指定的Component
设置为此根窗格的玻璃窗格。void
JWindow. setGlassPane(Component glassPane)
设置glassPane
属性。void
RootPaneContainer. setGlassPane(Component glassPane)
glassPane始终是rootPane的第一个孩子,rootPane布局管理器确保它始终与rootPane一样大。void
GroupLayout. setHonorsVisibility(Component component, Boolean honorsVisibility)
设置组件的可见性是否考虑到尺寸和定位。void
JPopupMenu. setInvoker(Component invoker)
设置此弹出菜单的调用者 - 要显示弹出菜单菜单的组件。void
JLabel. setLabelFor(Component c)
设置标签的组件。void
JLayeredPane. setLayer(Component c, int layer)
设置指定组件上的图层属性,使其成为该图层中最底层的组件。void
JLayeredPane. setLayer(Component c, int layer, int position)
设置指定组件的层属性,并设置其在该层中的位置。void
JSplitPane. setLeftComponent(Component comp)
将组件设置在左边(或更高)分隔线。void
JComponent. setNextFocusableComponent(Component aComponent)
已过时。截至1.4,由FocusTraversalPolicy
替代void
JLayeredPane. setPosition(Component c, int position)
将组件移动到其当前层中的position
,其中0是层内的最高位置,-1是最底层的位置。void
JSplitPane. setRightComponent(Component comp)
将组件设置在右侧(或更低)分隔线。void
JScrollPane. setRowHeaderView(Component view)
如果需要,创建行标题视口,设置其视图,然后将行标题视口添加到滚动条。void
JMenuBar. setSelected(Component sel)
设置当前选择的组件,产生对选择模型的更改。void
JPopupMenu. setSelected(Component sel)
设置当前选择的组件,这将导致选择模型的更改。void
JTabbedPane. setSelectedComponent(Component c)
设置此选项卡窗格的选定组件。void
JTabbedPane. setTabComponentAt(int index, Component component)
设置负责渲染指定选项卡的标题的组件。void
JSplitPane. setTopComponent(Component comp)
设置上面的分量,或分隔线的左边。void
JViewport. setView(Component view)
设置JViewport
的一个轻便孩子(view
),可以是null
。void
JScrollPane. setViewportView(Component view)
如果需要,创建一个视口,然后设置它的视图。void
JPopupMenu. show(Component invoker, int x, int y)
在组件调用者的坐标空间中的位置x,y处显示弹出式菜单。static int
JOptionPane. showConfirmDialog(Component parentComponent, Object message)
启动对话框,选择是 , 否和取消 ; 标题为“ 选择选项” 。static int
JOptionPane. showConfirmDialog(Component parentComponent, Object message, String title, int optionType)
提出一个对话框,其中选择次数由optionType
参数决定。static int
JOptionPane. showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
调出其中的选项的数目由所确定的一个对话框optionType
参数,其中,所述messageType
参数确定要显示的图标。static int
JOptionPane. showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
启动具有指定图标的对话框,其中选择数由optionType
参数决定。static Color
JColorChooser. showDialog(Component component, String title, Color initialColor)
显示模态颜色选择器对话框并阻塞,直到对话框被隐藏。static Color
JColorChooser. showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled)
显示模态颜色选择器对话框并阻塞,直到对话框被隐藏。int
JFileChooser. showDialog(Component parent, String approveButtonText)
使用自定义批准按钮弹出自定义文件选择器对话框。static String
JOptionPane. showInputDialog(Component parentComponent, Object message)
显示一个问题消息对话框,要求从父母的用户输入parentComponent
。static String
JOptionPane. showInputDialog(Component parentComponent, Object message, Object initialSelectionValue)
显示一个问题消息对话框,请求从用户输入并父母为parentComponent
。static String
JOptionPane. showInputDialog(Component parentComponent, Object message, String title, int messageType)
显示一个对话框,请求从父级为parentComponent
的用户输入,对话框具有标题title
和消息类型messageType
。static Object
JOptionPane. showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
在阻止对话框中提示用户输入,可以指定初始选择,可能的选择和所有其他选项。static int
JOptionPane. showInternalConfirmDialog(Component parentComponent, Object message)
启动一个内部对话面板,选择是 , 否和取消 ; 标题为“ 选择选项” 。static int
JOptionPane. showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType)
启动内部对话面板,其中选择次数由optionType
参数确定。static int
JOptionPane. showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
调出其中的选项数由所确定的内部对话框面板optionType
参数,其中,所述messageType
参数确定要显示的图标。static int
JOptionPane. showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
启动具有指定图标的内部对话面板,其中选择次数由optionType
参数确定。static String
JOptionPane. showInternalInputDialog(Component parentComponent, Object message)
显示一个内部问题消息对话框,要求从父母的用户输入parentComponent
。static String
JOptionPane. showInternalInputDialog(Component parentComponent, Object message, String title, int messageType)
显示一个内部对话框,请求从parentComponent
的用户输入的对话框,标题为title
,消息类型为messageType
。static Object
JOptionPane. showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
在阻止内部对话框中提示输入用户,可以指定初始选择,可能的选择和所有其他选项。static void
JOptionPane. showInternalMessageDialog(Component parentComponent, Object message)
启动内部确认对话框面板。static void
JOptionPane. showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType)
启动内部对话面板,使用messageType
参数确定的默认图标显示消息。static void
JOptionPane. showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
启动一个显示消息的内部对话框面板,指定所有参数。static int
JOptionPane. showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
启动具有指定图标的内部对话面板,其中初始选择由initialValue
参数确定,选择次数由optionType
参数确定。static void
JOptionPane. showMessageDialog(Component parentComponent, Object message)
提供一个名为“消息”的信息消息对话框。static void
JOptionPane. showMessageDialog(Component parentComponent, Object message, String title, int messageType)
使用由messageType
参数确定的默认图标显示消息的对话框。static void
JOptionPane. showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
显示一个显示消息的对话框,指定所有参数。int
JFileChooser. showOpenDialog(Component parent)
弹出一个“打开文件”文件选择器对话框。static int
JOptionPane. showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
启动一个带有指定图标的对话框,其中初始选择由initialValue
参数确定,选择次数由optionType
参数决定。int
JFileChooser. showSaveDialog(Component parent)
弹出“保存文件”文件选择器对话框。static void
SwingUtilities. updateComponentTreeUI(Component c)
一个简单的头脑的感觉变化:请问树中的每个节点是否是updateUI()
- 即用当前的外观来初始化其UI属性。static Spring
Spring. width(Component c)
返回一个弹簧,其 最小值 , 首选 值 , 最大值和 值属性由所提供组件的 minimumSize , preferredSize , maximumSize和 size属性的宽度定义。static Window
SwingUtilities. windowForComponent(Component c)
返回第Window
祖先c
,或null
如果c
未包含在里面Window
。Method parameters in javax.swing with type arguments of type Component Modifier and Type 方法 描述 protected void
SortingFocusTraversalPolicy. setComparator(Comparator<? super Component> comparator)
设置在焦点遍历周期中用于对组件进行排序的比较器。Constructors in javax.swing with parameters of type Component Constructor 描述 Constraints(Component c)
创建Constraints
与合适的物体x
,y
,width
和height
弹簧用于组分,c
。JScrollPane(Component view)
创建一个JScrollPane
,显示指定组件的内容,当组件的内容大于视图时,水平和垂直滚动条都会显示。JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
创建一个JScrollPane
,在视口中显示视图组件,其视图位置可以用一对滚动条来控制。JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)
使用指定的方向和重绘样式以及指定的组件创建一个新的JSplitPane
。JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
使用指定的方向和指定的组件创建一个新的JSplitPane
。Popup(Component owner, Component contents, int x, int y)
创建Popup
为组件owner
包含Componentcontents
。ProgressMonitor(Component parentComponent, Object message, String note, int min, int max)
构造一个显示进度的图形对象,通常通过填充矩形栏来完成过程。ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)
构造一个对象来监视输入流的进度。TransferSupport(Component component, Transferable transferable)
为给定组件创建一个TransferSupport
isDrop()
false
和Transferable
。Constructor parameters in javax.swing with type arguments of type Component Constructor 描述 SortingFocusTraversalPolicy(Comparator<? super Component> comparator)
使用指定的比较器构造SortingFocusTraversalPolicy。 -
Uses of Component in javax.swing.border
Methods in javax.swing.border with parameters of type Component Modifier and Type 方法 描述 int
AbstractBorder. getBaseline(Component c, int width, int height)
返回基线。int
TitledBorder. getBaseline(Component c, int width, int height)
返回基线。Component.BaselineResizeBehavior
AbstractBorder. getBaselineResizeBehavior(Component c)
返回一个枚举,指示组件的基线如何随着大小的变化而改变。Component.BaselineResizeBehavior
TitledBorder. getBaselineResizeBehavior(Component c)
返回一个枚举,指示边框的基线如何随着大小的变化而改变。Insets
AbstractBorder. getBorderInsets(Component c)
此默认实现返回一个由AbstractBorder.getBorderInsets(Component,Insets)
方法初始化的新的Insets
对象。Insets
AbstractBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
BevelBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
Border. getBorderInsets(Component c)
返回边框的插入。Insets
CompoundBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
EmptyBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
EtchedBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
LineBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
MatteBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
SoftBevelBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。Insets
StrokeBorder. getBorderInsets(Component c, Insets insets)
使用此边框的当前插图重新初始化insets
参数。Insets
TitledBorder. getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。protected Font
TitledBorder. getFont(Component c)
返回标题边框的默认字体。Color
EtchedBorder. getHighlightColor(Component c)
在指定的组件上渲染时返回蚀刻边框的突出显示颜色。Color
BevelBorder. getHighlightInnerColor(Component c)
在指定的组件上渲染时返回斜角边框的内部高亮颜色。Color
BevelBorder. getHighlightOuterColor(Component c)
在指定的组件上呈现时,返回斜角边框的外部高亮颜色。Rectangle
AbstractBorder. getInteriorRectangle(Component c, int x, int y, int width, int height)
这种方便方法调用静态方法。static Rectangle
AbstractBorder. getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
使用参数减去边框的插入返回一个矩形。Dimension
TitledBorder. getMinimumSize(Component c)
返回边框所需的最小尺寸,以便完全显示边框和标题。Color
EtchedBorder. getShadowColor(Component c)
在指定的组件上呈现时,返回蚀刻边框的阴影颜色。Color
BevelBorder. getShadowInnerColor(Component c)
在指定的组件上呈现时,返回斜角边框的内阴影颜色。Color
BevelBorder. getShadowOuterColor(Component c)
在指定的组件上呈现时,返回斜角边框的外阴影颜色。void
AbstractBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
此默认实现不绘画。void
BevelBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。void
Border. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。void
CompoundBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
通过用指定的位置和大小绘制外部边框来绘制复合边框,然后通过外部边框的插入在指定位置和大小偏移处绘制内边框。void
EmptyBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
默认情况下不绘图。void
EtchedBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。void
LineBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。void
MatteBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
涂抹无光泽的边框。void
SoftBevelBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。void
StrokeBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。void
TitledBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。protected void
BevelBorder. paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定部件的下降斜面。protected void
BevelBorder. paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的凸起斜面。 -
Uses of Component in javax.swing.colorchooser
Subclasses of Component in javax.swing.colorchooser Modifier and Type Class 描述 class
AbstractColorChooserPanel
这是颜色选择器的抽象超类。 -
Uses of Component in javax.swing.event
Constructors in javax.swing.event with parameters of type Component Constructor 描述 MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)
构造一个MenuDragMouseEvent对象。MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)
构造一个MenuDragMouseEvent对象。MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
构造一个MenuKeyEvent对象。 -
Uses of Component in javax.swing.plaf
Classes in javax.swing.plaf with type parameters of type Component Modifier and Type Class 描述 class
LayerUI<V extends Component>
所有JLayer
的UI代表的基类。Methods in javax.swing.plaf with parameters of type Component Modifier and Type 方法 描述 Insets
BorderUIResource. getBorderInsets(Component c)
void
BorderUIResource. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void
IconUIResource. paintIcon(Component c, Graphics g, int x, int y)
-
Uses of Component in javax.swing.plaf.basic
Subclasses of Component in javax.swing.plaf.basic Modifier and Type Class 描述 class
BasicArrowButton
JButton对象在其中一个主要方向上绘制了一个缩放的箭头。class
BasicComboBoxRenderer
ComboBox渲染器static class
BasicComboBoxRenderer.UIResource
BasicComboBoxRenderer的子类实现UIResource。class
BasicComboPopup
这是ComboPopup
接口的基本实现。class
BasicInternalFrameTitlePane
管理基本标题栏的类class
BasicInternalFrameTitlePane.SystemMenuBar
这个类应该被视为一个“受保护”的内部类。class
BasicSplitPaneDivider
BasicSplitPaneUI使用的分隔符。protected class
BasicToolBarUI.DragWindow
在拖动JToolBar
期间出现的窗口。Fields in javax.swing.plaf.basic declared as Component Modifier and Type Field 描述 protected Component[]
BasicSplitPaneUI.BasicHorizontalLayoutManager. components
组件。protected Component
BasicTreeUI.MouseInputHandler. destination
接收所有事件的目的地。protected Component
BasicTreeUI. editingComponent
编辑时,这将是正在进行实际编辑的组件。protected Component
BasicComboBoxUI. editor
@ {code ComboBoxEditor}用于编辑的组件。protected Component
BasicSplitPaneDivider. hiddenDivider
用于非连续布局模式的分隔线。protected Component
BasicOptionPaneUI. initialFocusComponent
在使用selectInitialValue消息时接收焦点的组件。protected Component
BasicSplitPaneUI. nonContinuousLayoutDivider
当使用非连续布局时,分隔线阴影的实例。protected Component
BasicTreeUI.MouseInputHandler. source
来源于事件来自。Component
BasicMenuUI.ChangeHandler. wasFocused
集中的组件。Methods in javax.swing.plaf.basic that return Component Modifier and Type 方法 描述 protected Component
BasicSplitPaneUI. createDefaultNonContinuousLayoutDivider()
返回默认的非连续布局分隔符,这是一个Canvas
的实例,用灰色填充背景。protected Component
BasicSpinnerUI. createNextButton()
创建一个增量按钮,即使用spinner.getNextValue
返回的对象替换微调spinner.getNextValue
值的spinner.getNextValue
。protected Component
BasicSpinnerUI. createPreviousButton()
创建一个减量按钮,即使用spinner.getPreviousValue
返回的对象替换微调spinner.getPreviousValue
值的spinner.getPreviousValue
。Component
BasicComboBoxEditor. getEditorComponent()
protected Component
BasicSliderUI. getHighestValueLabel()
返回与标签表中最低的滑块值对应的标签。Component
BasicComboBoxRenderer. getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)
protected Component
BasicSliderUI. getLowestValueLabel()
返回与标签表中最高的滑块值对应的标签。Component
BasicSplitPaneUI. getNonContinuousLayoutDivider()
当JSplitPane
配置为不连续布局时,返回要使用的分隔符。protected Component
BasicTabbedPaneUI. getVisibleComponent()
返回可见组件。Methods in javax.swing.plaf.basic with parameters of type Component Modifier and Type 方法 描述 void
BasicComboBoxUI.ComboBoxLayoutManager. addLayoutComponent(String name, Component comp)
void
BasicInternalFrameTitlePane.TitlePaneLayout. addLayoutComponent(String name, Component c)
void
BasicInternalFrameUI.InternalFrameLayout. addLayoutComponent(String name, Component c)
如果布局管理器使用每个组件字符串,则将组件comp
添加到布局,将其与name
指定的字符串相关联。void
BasicOptionPaneUI.ButtonAreaLayout. addLayoutComponent(String string, Component comp)
void
BasicScrollBarUI. addLayoutComponent(String name, Component child)
void
BasicSplitPaneDivider.DividerLayout. addLayoutComponent(String string, Component c)
void
BasicSplitPaneUI.BasicHorizontalLayoutManager. addLayoutComponent(Component comp, Object constraints)
使用指定的约束对象将指定的组件添加到布局。void
BasicSplitPaneUI.BasicHorizontalLayoutManager. addLayoutComponent(String place, Component component)
将组件添加到位置。void
BasicTabbedPaneUI.TabbedPaneLayout. addLayoutComponent(String name, Component comp)
boolean
BasicToolBarUI. canDock(Component c, Point p)
如果JToolBar
可以在给定的位置停靠,则返回true
。protected void
BasicTreeUI. drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
绘制以(x,y)为中心的icon
。Insets
BasicBorders.ButtonBorder. getBorderInsets(Component c, Insets insets)
Insets
BasicBorders.FieldBorder. getBorderInsets(Component c, Insets insets)
Insets
BasicBorders.MarginBorder. getBorderInsets(Component c, Insets insets)
Insets
BasicBorders.MenuBarBorder. getBorderInsets(Component c, Insets insets)
Insets
BasicBorders.RadioButtonBorder. getBorderInsets(Component c, Insets insets)
Insets
BasicBorders.SplitPaneBorder. getBorderInsets(Component c)
Insets
BasicBorders.ToggleButtonBorder. getBorderInsets(Component c, Insets insets)
protected int
BasicSplitPaneUI.BasicHorizontalLayoutManager. getPreferredSizeOfComponent(Component c)
返回传递的组件首选大小的宽度。protected Dimension
BasicComboBoxUI. getSizeForComponent(Component comp)
如果用作单元格渲染器,则返回组件将具有的大小。protected int
BasicSplitPaneUI.BasicHorizontalLayoutManager. getSizeOfComponent(Component c)
返回传入组件的宽度。protected void
BasicSpinnerUI. installNextButtonListeners(Component c)
在下一个按钮c
上安装必要的听众,以更新JSpinner
以响应用户的手势。protected void
BasicSpinnerUI. installPreviousButtonListeners(Component c)
在上一个按钮c
上安装必要的听众,以更新JSpinner
以响应用户的手势。void
BasicBorders.ButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void
BasicBorders.FieldBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void
BasicBorders.MenuBarBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void
BasicBorders.RadioButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void
BasicBorders.RolloverButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
BasicBorders.SplitPaneBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void
BasicBorders.ToggleButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
protected void
BasicSliderUI. paintHorizontalLabel(Graphics g, int value, Component label)
为标签表中的每个标签调用。protected void
BasicSliderUI. paintVerticalLabel(Graphics g, int value, Component label)
为标签表中的每个标签调用。void
BasicComboBoxUI.ComboBoxLayoutManager. removeLayoutComponent(Component comp)
void
BasicInternalFrameTitlePane.TitlePaneLayout. removeLayoutComponent(Component c)
void
BasicInternalFrameUI.InternalFrameLayout. removeLayoutComponent(Component c)
从布局中删除指定的组件。void
BasicOptionPaneUI.ButtonAreaLayout. removeLayoutComponent(Component c)
void
BasicScrollBarUI. removeLayoutComponent(Component child)
void
BasicSplitPaneDivider.DividerLayout. removeLayoutComponent(Component c)
void
BasicSplitPaneUI.BasicHorizontalLayoutManager. removeLayoutComponent(Component component)
从我们的知识中删除指定的组件。void
BasicTabbedPaneUI.TabbedPaneLayout. removeLayoutComponent(Component comp)
protected void
BasicToolBarUI. setBorderToNonRollover(Component c)
将组件的边框设置为具有由BasicToolBarUI.createNonRolloverBorder()
方法创建的非滚动边框。protected void
BasicToolBarUI. setBorderToNormal(Component c)
将组件的边框设置为具有正常边框。protected void
BasicToolBarUI. setBorderToRollover(Component c)
将组件的边框设置为具有由BasicToolBarUI.createRolloverBorder()
方法创建的翻转边框。protected void
BasicSplitPaneUI.BasicHorizontalLayoutManager. setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)
将组件c
的宽度设置为size
,将其x位置放置在location
,y到insets.top
,高度为containerSize.height
减少顶部和底部插入。protected void
BasicSplitPaneUI. setNonContinuousLayoutDivider(Component newDivider)
将JSplitPane
配置为不连续布局时,设置使用的分隔符。protected void
BasicSplitPaneUI. setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes)
设置要使用的分隔符。protected void
BasicTabbedPaneUI. setVisibleComponent(Component component)
设置可见组件。Constructors in javax.swing.plaf.basic with parameters of type Component Constructor 描述 MouseInputHandler(Component source, Component destination, MouseEvent event)
构造一个新的实例MouseInputHandler
。 -
Uses of Component in javax.swing.plaf.metal
Subclasses of Component in javax.swing.plaf.metal Modifier and Type Class 描述 class
MetalComboBoxButton
JButton子类来帮助MetalComboBoxUIclass
MetalComboBoxUI.MetalComboPopup
已过时。从Java 2平台v1.4开始。protected class
MetalFileChooserUI.FileRenderer
已过时。截至JDK版本9.过时的课程。class
MetalFileChooserUI.FilterComboBoxRenderer
渲染不同类型的尺寸和样式。class
MetalInternalFrameTitlePane
管理JLF标题栏的类class
MetalScrollButton
金属滚动条箭头的JButton对象。Methods in javax.swing.plaf.metal that return Component Modifier and Type 方法 描述 Component
MetalFileChooserUI.FilterComboBoxRenderer. getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Methods in javax.swing.plaf.metal with parameters of type Component Modifier and Type 方法 描述 protected void
MetalCheckBoxIcon. drawCheck(Component c, Graphics g, int x, int y)
油漆MetalCheckBoxIcon
。Insets
MetalBorders.ButtonBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.Flush3DBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.InternalFrameBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.MenuBarBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.MenuItemBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.OptionDialogBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.PaletteBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.PopupMenuBorder. getBorderInsets(Component c, Insets newInsets)
Insets
MetalBorders.ScrollPaneBorder. getBorderInsets(Component c, Insets insets)
Insets
MetalBorders.TableHeaderBorder. getBorderInsets(Component c, Insets insets)
Insets
MetalBorders.ToolBarBorder. getBorderInsets(Component c, Insets newInsets)
void
MetalBorders.ButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.Flush3DBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.InternalFrameBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.MenuBarBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.MenuItemBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.OptionDialogBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.PaletteBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.PopupMenuBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.RolloverButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.ScrollPaneBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.TableHeaderBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.TextFieldBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.ToggleButtonBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalBorders.ToolBarBorder. paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void
MetalCheckBoxIcon. paintIcon(Component c, Graphics g, int x, int y)
void
MetalComboBoxIcon. paintIcon(Component c, Graphics g, int x, int y)
涂上水平条void
MetalIconFactory.FileIcon16. paintIcon(Component c, Graphics g, int x, int y)
void
MetalIconFactory.FolderIcon16. paintIcon(Component c, Graphics g, int x, int y)
void
MetalIconFactory.PaletteCloseIcon. paintIcon(Component c, Graphics g, int x, int y)
void
MetalIconFactory.TreeControlIcon. paintIcon(Component c, Graphics g, int x, int y)
void
MetalIconFactory.TreeControlIcon. paintMe(Component c, Graphics g, int x, int y)
TreeControlIcon
。void
MetalLookAndFeel. provideErrorFeedback(Component component)
当用户尝试无效操作时调用,例如粘贴到具有焦点的不可编辑的JTextField
中。protected void
MetalToolBarUI. setBorderToNonRollover(Component c)
-
Uses of Component in javax.swing.plaf.synth
Methods in javax.swing.plaf.synth that return Component Modifier and Type 方法 描述 protected Component
SynthSplitPaneUI. createDefaultNonContinuousLayoutDivider()
返回默认的非连续布局分隔符,这是一个Canvas
的实例,用灰色填充背景。protected Component
SynthSpinnerUI. createNextButton()
创建一个增量按钮,即用spinner.getNextValue
返回的对象替换微调spinner.getNextValue
值的spinner.getNextValue
。protected Component
SynthSpinnerUI. createPreviousButton()
创建一个减量按钮,即使用spinner.getPreviousValue
返回的对象替换微调spinner.getPreviousValue
值的spinner.getPreviousValue
。Methods in javax.swing.plaf.synth with parameters of type Component Modifier and Type 方法 描述 protected void
SynthTreeUI. drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
绘制以(x,y)为中心的icon
。default void
SynthIcon. paintIcon(Component c, Graphics g, int x, int y)
protected void
SynthToolBarUI. setBorderToNonRollover(Component c)
这个实现什么都不做,因为JToolBar
类的rollover
属性在Synth Look and Feel中没有使用。protected void
SynthToolBarUI. setBorderToNormal(Component c)
这个实现什么都不做,因为JToolBar
类的rollover
属性在Synth Look和Feel中没有使用。protected void
SynthToolBarUI. setBorderToRollover(Component c)
这个实现什么都不做,因为JToolBar
类的rollover
属性没有用在Synth Look and Feel中。static void
SynthLookAndFeel. updateStyles(Component c)
更新与c
及其所有子项相关联的样式。 -
Uses of Component in javax.swing.table
Subclasses of Component in javax.swing.table Modifier and Type Class 描述 class
DefaultTableCellRenderer
在JTable
渲染(显示)单个单元格的标准类。static class
DefaultTableCellRenderer.UIResource
DefaultTableCellRenderer
的子类实现UIResource
。class
JTableHeader
这是管理JTable
的标题的JTable
。Methods in javax.swing.table that return Component Modifier and Type 方法 描述 Component
TableCellEditor. getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
为编辑器设置初始value
。Component
DefaultTableCellRenderer. getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
返回默认的表格单元格渲染器。Component
TableCellRenderer. getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
返回用于绘制单元格的组件。 -
Uses of Component in javax.swing.text
Subclasses of Component in javax.swing.text Modifier and Type Class 描述 class
JTextComponent
JTextComponent
是摆动文本组件的基础类。Methods in javax.swing.text that return Component Modifier and Type 方法 描述 protected Component
ComponentView. createComponent()
创建与此视图关联的组件。Component
ComponentView. getComponent()
获取与视图关联的组件。static Component
StyleConstants. getComponent(AttributeSet a)
从属性列表获取组件设置。Methods in javax.swing.text with parameters of type Component Modifier and Type 方法 描述 protected void
PlainView. damageLineRange(int line0, int line1, Shape a, Component host)
重复给定行范围。static void
StyleConstants. setComponent(MutableAttributeSet a, Component c)
设置组件属性。 -
Uses of Component in javax.swing.text.html
Methods in javax.swing.text.html that return Component Modifier and Type 方法 描述 protected Component
FormView. createComponent()
创建组件。protected Component
ObjectView. createComponent()
创建组件。 -
Uses of Component in javax.swing.tree
Subclasses of Component in javax.swing.tree Modifier and Type Class 描述 class
DefaultTreeCellEditor.DefaultTextField
当不提供编辑器时使用TextField
。class
DefaultTreeCellEditor.EditorContainer
集装箱负责放置editingComponent
。class
DefaultTreeCellRenderer
在树中显示一个条目。Fields in javax.swing.tree declared as Component Modifier and Type Field 描述 protected Component
DefaultTreeCellEditor. editingComponent
组件用于编辑,从editingContainer
获得。Methods in javax.swing.tree that return Component Modifier and Type 方法 描述 Component
DefaultTreeCellEditor. getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
配置编辑器。Component
TreeCellEditor. getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
设置编辑器的初始 值 。Component
DefaultTreeCellRenderer. getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
根据传入的组件配置渲染器。Component
TreeCellRenderer. getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
将当前树状单元格的值设置为value
。
-