|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
public interface RootPaneContainer
이 인터페이스는, JRootPane 의 아이를 1 살 가지는 JDialog, JFrame, JWindow, JApplet, JInternalFrame 등의 컴퍼넌트에 의해 구현됩니다. 이 인터페이스의 메소드는, JRootPane 프로퍼티의 「대신 」을 할 뿐입니다. 예를 들어,getContentPane() 는 일반적으로은 다음과 같이 구현
됩니다.
public Container getContentPane() {
return getRootPane(). getContentPane();
}
이 인터페이스는, 단일의 JRootPane 를 가지는 JFrame 등의 컴퍼넌트를 특별히 처리하는 Swing GUI 빌더의 「마커」로서 기능합니다. 예를 들어 GUI 빌더에서는, RootPaneContainer 에 컴퍼넌트를 드롭 하면(자),frame.getContentPane(). add(child) 로서 해석됩니다.
편의상,JFrame,JDialog,JWindow,JApplet, 및 JInternalFrame 는 디폴트로 add,remove, 및 setLayout 메소드의 모든 호출을 contentPane 에 전송 합니다. 즉, 다음과 같이 호출할 수 있습니다.
rootPaneContainer.add(component);다음과 같이 기술할 필요는 없습니다.
rootPaneContainer.getContentPane(). add(component);
JFrame,JDialog,JWindow,JApplet, 및 JInternalFrame 에 대한 add 및 setLayout 메소드의 동작은,rootPaneCheckingEnabled 프로퍼티에 의해 제어됩니다. 이 프로퍼티이 true (디폴트)의 경우는, 이러한 메소드의 호출이 contentPane 에 전송 됩니다. false 의 경우, 이러한 메소드는 RootPaneContainer 로 직접 실행됩니다. 이 프로퍼티은 서브 클래스만을 대상으로 하고 있기 (위해)때문에, 보호되고 있습니다.
JRootPane ,
JFrame ,
JDialog ,
JWindow ,
JApplet ,
JInternalFrame | 메소드의 개요 | |
|---|---|
Container |
getContentPane ()
contentPane 를 돌려줍니다. |
Component |
getGlassPane ()
glassPane 를 돌려줍니다. |
JLayeredPane |
getLayeredPane ()
layeredPane 를 돌려줍니다. |
JRootPane |
getRootPane ()
이 컴퍼넌트의 단일의 JRootPane 의 아이를 돌려줍니다. |
void |
setContentPane (Container contentPane)
「contentPane」는, 어플리케이션 고유의 컴퍼넌트의 일차 컨테이너입니다. |
void |
setGlassPane (Component glassPane)
glassPane 는 항상 rootPane 의 최초의 아이로, rootPane 의 레이아웃 매니저에 의해, 항상 rootPane 와 같은 크기인 것이 보증됩니다. |
void |
setLayeredPane (JLayeredPane layeredPane)
contentPane 를 관리하는 컨테이너로, 경우에 따라서는 도구모음도 관리합니다. |
| 메소드의 상세 |
|---|
JRootPane getRootPane()
JRootPane void setContentPane(Container contentPane)
contentPane 를 null 로 할 수 없습니다.
일반적으로은, 다음과 같이 구현됩니다. getRootPane(). setContentPane(contentPane);
contentPane - 이 JRootPane 의 컨텐츠에 사용한다
컨테이너
IllegalComponentStateException - 컨텐츠 구획 파라미터가
null 의 경우 (실행시 예외)JRootPane.getContentPane() ,
getContentPane() Container getContentPane()
setContentPane(java.awt.Container) void setLayeredPane(JLayeredPane layeredPane)
layeredPane 를 null 로 할 수 없습니다.
일반적으로은, 다음과 같이 구현됩니다.
getRootPane(). setLayeredPane(layeredPane);
IllegalComponentStateException - 계층화 구획 파라미터가
null 의 경우 (실행시 예외)getLayeredPane() ,
JRootPane.getLayeredPane() JLayeredPane getLayeredPane()
setLayeredPane(javax.swing.JLayeredPane) void setGlassPane(Component glassPane)
glassPane 를 null 로 설정할 수 없습니다.
일반적으로은, 다음과 같이 구현됩니다. getRootPane(). setGlassPane(glassPane);
getGlassPane() ,
JRootPane.setGlassPane(java.awt.Component) Component getGlassPane()
setGlassPane(java.awt.Component)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.