|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
java.lang.Objectjavax.swing.PopupFactory
public class PopupFactory
PopupFactory 는, 이름으로부터 알도록(듯이),Popup 의 인스턴스를 취득하기 위해서 사용합니다. Popup 는, 특정의 포함 관계의 계층에 존재하는 것 외의 모든 Component 위에 Component 를 배치하기 위해서 사용합니다. 범용 규약에서는,PopupFactory 로부터 Popup 를 취득했을 경우, 그 Popup 에 대해서 hide 를 호출할 필요가 있습니다. 일반적으로은, 다음과 같이 사용합니다.
PopupFactory factory = PopupFactory.getSharedInstance(); Popup popup = factory.getPopup(owner, contents, x, y); popup.show(); ... popup.hide();
Popup | 생성자 의 개요 | |
|---|---|
PopupFactory ()
|
|
| 메소드의 개요 | |
|---|---|
Popup |
getPopup (Component owner,
Component contents,
int x,
int y)
컴퍼넌트 contents 를 포함한 컴퍼넌트 owner 의 Popup 를 작성합니다. |
static PopupFactory |
getSharedInstance ()
Popup 를 취득하기 위해서 사용할 수 있는 공유 PopupFactory 를 돌려줍니다. |
static void |
setSharedInstance (PopupFactory factory)
Popup 의 취득에 사용되는 PopupFactory 를 설정합니다. |
| 클래스 java.lang. Object 로부터 상속된 메소드 |
|---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| 생성자 의 상세 |
|---|
public PopupFactory()
| 메소드의 상세 |
|---|
public static void setSharedInstance(PopupFactory factory)
Popup 의 취득에 사용되는 PopupFactory 를 설정합니다. factory 가 null 의 경우,IllegalArgumentException 를 throw 합니다.
factory - 공유 PopupFactory
IllegalArgumentException - factory 가 null 의 경우getPopup(java.awt.Component, java.awt.Component, int, int) public static PopupFactory getSharedInstance()
Popup 를 취득하기 위해서 사용할 수 있는 공유 PopupFactory 를 돌려줍니다.
public Popup getPopup(Component owner,
Component contents,
int x,
int y)
throws IllegalArgumentException
contents 를 포함한 컴퍼넌트 owner 의 Popup 를 작성합니다. owner 는, 어느 Window (새로운 Popup)가 Popup 의 작성처의 Component 의 부모가 되는지를 지정하기 위해서 사용합니다. owner 가 null 의 경우, 유효한 부모가 없는 것을 나타냅니다. x 와 y 에는,Popup 를 최초로 배치하는 위치를 지정합니다. 화면의 사이즈나 다른 파라미터에 따라서는,Popup 가 x 와 y 에 표시되지 않는 것이 있습니다.
owner - 마우스의 좌표의 기준이 되는 Component. null 도 가능contents - Popup 의 Contentsx - 초기의 x 화면 좌표y - 초기의 y 화면 좌표
IllegalArgumentException - contents 가 null 의 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.