public class Popup extends Object
Component给用户,通常在顶部的所有其他
Components在一个特定的层次结构。
Popups有一个非常小的生命周期。一旦你得到了
Popup,隐藏它(被调用的
hide方法),你不应该再调用它的任何方法。这让
PopupFactory缓存后使用
Popups。
一般的合同,如果你需要改变的Component大小或位置的Popup,你应该获得一个新的Popup。
Popup不下降Component,而实现的Popup负责创建和维护自己的Components渲染要求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.