public class Popup extends Object
Component
给用户,通常在顶部的所有其他
Component
s在一个特定的层次结构。
Popup
s有一个非常小的生命周期。一旦你得到了
Popup
,隐藏它(被调用的
hide
方法),你不应该再调用它的任何方法。这让
PopupFactory
缓存后使用
Popup
s。
一般的合同,如果你需要改变的Component
大小或位置的Popup
,你应该获得一个新的Popup
。
Popup
不下降Component
,而实现的Popup
负责创建和维护自己的Component
s渲染要求Component
给用户。
你通常不显式创建的Popup
实例,而不是得到一个从PopupFactory
。
PopupFactory
protected Popup(Component owner, Component contents, int x, int y)
contents
owner
Popup
。
owner
是用来确定新的
Popup
将父母的
Component
的
Popup
创建,
Window
。空
owner
意味着没有有效的父。
x
和
y
指定地点的
Popup
在首选的位置。基于屏幕尺寸,或其他参数,该
Popup
可能不会显示在
x
和
y
。
owner
组件的鼠标坐标是相对的,可能是空的
contents
-内容
x
初始屏幕X坐标
y
初始y屏幕坐标
IllegalArgumentException
如果内容是空的
protected Popup()
Popup
。这是为子类提供的。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.