|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
javax.swing.JWindow
public class JWindow
JWindow
는, 사용자의 데스크탑상의 어디에라도 표시할 수 있는 컨테이너입니다. 타이틀 바, 윈도우 관리 버튼, 또는 JFrame
에 관련한 것 외의 장식을 가지지 않습니다만, 그런데도 사용자의 데스크탑의 「최상급의 멤버」이며, 그 어디에라도 표시할 수 있습니다.
JWindow
컴퍼넌트에는,JRootPane
가 유일한 아이로서 포함됩니다. contentPane
는 JWindow
의 모든 아이의 부모가 될 필요가 있습니다. 편의상,add
와 그 파생 메소드,remove
및 setLayout
는, 필요에 따라서 contentPane
에 전송 되도록(듯이) 오버라이드(override) 되고 있습니다. 즉, 다음과 같이 기술할 수 있습니다.
window.add(child);아이는
contentPane
에 추가됩니다. contentPane
는 항상 null
이외의 값이 됩니다. null
로 설정하려고 하면(자),JWindow
가 예외를 throw 합니다. 디폴트의 contentPane
에는,BorderLayout
매니저가 설정됩니다. JWindow
의 LayoutManager
의 추가, 삭제, 및 설정의 상세한 것에 대하여는,RootPaneContainer
를 참조해 주세요.
contentPane
,glassPane
, 및 layeredPane
컴퍼넌트의 상세한 것에 대하여는,JRootPane
의 설명을 참조해 주세요.
멀티스크린 환경의 경우에는, 다른 스크린 디바이스상에서 JWindow
를 생성할 수 있습니다. 자세한 것은,Window
를 참조해 주세요.
경고: Swing 는 thread에 대해서 안전하지는 않습니다. 자세한 것은,「Swing's Threading Policy」를 참조해 주세요.
경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans™ 의 장기간의 운용 지원는,java.beans
패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder
를 참조해 주세요.
JRootPane
상자의 클래스의 개요 | |
---|---|
protected class |
JWindow.AccessibleJWindow
이 클래스는 JWindow 클래스용의 접근성? 지원를 구현하고 있습니다. |
클래스 java.awt. Window 로부터 상속된 상자의 클래스/인터페이스 |
---|
Window.AccessibleAWTWindow |
클래스 java.awt. Container 로부터 상속된 상자의 클래스/인터페이스 |
---|
Container.AccessibleAWTContainer |
클래스 java.awt. Component 로부터 상속된 상자의 클래스/인터페이스 |
---|
Component.AccessibleAWTComponent , Component.BaselineResizeBehavior , Component.BltBufferStrategy , Component.FlipBufferStrategy |
필드의 개요 | |
---|---|
protected AccessibleContext |
accessibleContext
사용자 보조 기능의 문맥 프로퍼티입니다. |
protected JRootPane |
rootPane
glassPane 뿐만이 아니라, 이 프레임의 contentPane 및 옵션의 menuBar 를 관리하는 JRootPane 의 인스턴스입니다. |
protected boolean |
rootPaneCheckingEnabled
true 의 경우는, add 및 setLayout 의 호출이 contentPane 에 전송 됩니다. |
클래스 java.awt. Component 로부터 상속된 필드 |
---|
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT |
인터페이스 java.awt.image. ImageObserver 로부터 상속된 필드 |
---|
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH |
생성자 의 개요 | |
---|---|
JWindow ()
오너의 지정되어 있지 않은 윈도우를 작성합니다. |
|
JWindow (Frame owner)
지정한 오너 프레임을 가진 윈도우를 작성합니다. |
|
JWindow (GraphicsConfiguration gc)
윈도우를, 화면 디바이스의 지정된 GraphicsConfiguration 에 타이틀없이 작성합니다. |
|
JWindow (Window owner)
오너 윈도우를 지정해 윈도우를 작성합니다. |
|
JWindow (Window owner,
GraphicsConfiguration gc)
오너 윈도우와 스크린 디바이스의 GraphicsConfiguration 를 지정해 윈도우를 작성합니다. |
메소드의 개요 | |
---|---|
protected void |
addImpl (Component comp,
Object constraints,
int index)
지정된 아이 Component 를 추가합니다. |
protected JRootPane |
createRootPane ()
생성자 메소드에 의해 불려 가 디폴트의 rootPane 를 작성합니다. |
AccessibleContext |
getAccessibleContext ()
이 JWindow 에 관련한 AccessibleContext 를 돌려줍니다. |
Container |
getContentPane ()
이 윈도우의 contentPane 인 Container 를 돌려줍니다. |
Component |
getGlassPane ()
이 윈도우의 glassPane Component 를 돌려줍니다. |
Graphics |
getGraphics ()
이 컴퍼넌트의 그래픽스 문맥을 작성합니다. |
JLayeredPane |
getLayeredPane ()
이 윈도우의 layeredPane 객체를 돌려줍니다. |
JRootPane |
getRootPane ()
이 윈도우의 rootPane 객체를 돌려줍니다. |
TransferHandler |
getTransferHandler ()
transferHandler 프로퍼티을 돌려줍니다. |
protected boolean |
isRootPaneCheckingEnabled ()
add 및 setLayout 의 호출이 contentPane 에 전송 될지 어떨지를 돌려줍니다. |
protected String |
paramString ()
이 JWindow 의 캐릭터 라인 표현을 돌려줍니다. |
void |
remove (Component comp)
지정된 컴퍼넌트를 컨테이너로부터 삭제합니다. |
void |
repaint (long time,
int x,
int y,
int width,
int height)
이 컴퍼넌트의 지정된 구형 영역을 time 밀리 세컨드 이내에 재draw 합니다. |
void |
setContentPane (Container contentPane)
이 윈도우의 contentPane 프로퍼티을 설정합니다. |
void |
setGlassPane (Component glassPane)
glassPane 프로퍼티을 설정합니다. |
void |
setLayeredPane (JLayeredPane layeredPane)
layeredPane 프로퍼티을 설정합니다. |
void |
setLayout (LayoutManager manager)
LayoutManager 를 설정합니다. |
protected void |
setRootPane (JRootPane root)
이 윈도우의 새로운 rootPane 객체를 설정합니다. |
protected void |
setRootPaneCheckingEnabled (boolean enabled)
add 및 setLayout 의 호출이 contentPane 에 전송 될지 어떨지를 설정합니다. |
void |
setTransferHandler (TransferHandler newHandler)
이 컴퍼넌트에의 데이터 전송을 지원하는 기구인, transferHandler 프로퍼티을 설정합니다. |
void |
update (Graphics g)
paint(g) 를 호출합니다. |
protected void |
windowInit ()
JWindow 를 적절히 초기화하기 위해서 생성자 에 의해 불려 갑니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
필드의 상세 |
---|
protected JRootPane rootPane
glassPane
뿐만이 아니라, 이 프레임의 contentPane
및 옵션의 menuBar
를 관리하는 JRootPane
의 인스턴스입니다.
getRootPane()
,
setRootPane(javax.swing.JRootPane)
protected boolean rootPaneCheckingEnabled
add
및 setLayout
의 호출이 contentPane
에 전송 됩니다. 처음은 false 입니다만,JWindow
가 구축되면(자), true 로 설정됩니다.
isRootPaneCheckingEnabled()
,
setRootPaneCheckingEnabled(boolean)
,
RootPaneContainer
protected AccessibleContext accessibleContext
생성자 의 상세 |
---|
public JWindow()
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true 를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
Window.isFocusableWindow()
,
JComponent.getDefaultLocale()
public JWindow(GraphicsConfiguration gc)
GraphicsConfiguration
에 타이틀없이 작성합니다. 이 윈도우에는, 포커스가 설정되지 않습니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
gc
- 새로운 윈도우를 구축하기 위해서 사용하는 GraphicsConfiguration
. gc 가 null
의 경우, 시스템의 디폴트는,GraphicsConfiguration
라고 생각된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true 를 돌려주는 경우
IllegalArgumentException
- gc
가 스크린 디바이스의 것이 아닌 경우GraphicsEnvironment.isHeadless()
,
Window.isFocusableWindow()
,
JComponent.getDefaultLocale()
public JWindow(Frame owner)
owner
가 null
의 경우는, 공유 소유자가 사용되어 이 윈도우에는 포커스가 설정되지 않습니다. 또, 소유자가 화면에 표시되지 않는 한, 이 윈도우에는 포커스가 설정되지 않습니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 윈도우를 표시하는 프레임
HeadlessException
- GraphicsEnvironment.isHeadless()가 true 를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
Window.isFocusableWindow()
,
JComponent.getDefaultLocale()
public JWindow(Window owner)
owner
가 null
의 경우는, 공유 소유자가 사용되어 이 윈도우에는 포커스가 설정되지 않습니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 윈도우를 표시하는 윈도우
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true 를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
Window.isFocusableWindow()
,
JComponent.getDefaultLocale()
public JWindow(Window owner, GraphicsConfiguration gc)
GraphicsConfiguration
를 지정해 윈도우를 작성합니다. owner
가 null
의 경우는, 공유 소유자가 사용되어 이 윈도우에는 포커스가 설정되지 않습니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 윈도우를 표시하는 윈도우gc
- 새로운 윈도우의 구축에 사용하는 GraphicsConfiguration
. gc 가 null
의 경우, 시스템 디폴트의 GraphicsConfiguration
가 사용된다. 다만,owner
도 null 의 경우는, 공유 오너 프레임의 GraphicsConfiguration
가 사용된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true 를 돌려주는 경우
IllegalArgumentException
- gc
가 스크린 디바이스의 것이 아닌 경우GraphicsEnvironment.isHeadless()
,
Window.isFocusableWindow()
,
JComponent.getDefaultLocale()
메소드의 상세 |
---|
protected void windowInit()
JWindow
를 적절히 초기화하기 위해서 생성자 에 의해 불려 갑니다.
protected JRootPane createRootPane()
rootPane
를 작성합니다.
protected boolean isRootPaneCheckingEnabled()
add
및 setLayout
의 호출이 contentPane
에 전송 될지 어떨지를 돌려줍니다.
add
및 setLayout
가 전송 되는 경우는 true, 그렇지 않은 경우는 falseaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
setRootPaneCheckingEnabled(boolean)
,
RootPaneContainer
public void setTransferHandler(TransferHandler newHandler)
transferHandler
프로퍼티을 설정합니다. 컴퍼넌트가 데이터 전송 조작을 지원하지 않는 경우,null
를 사용합니다.
시스템 프로퍼티 suppressSwingDropSupport
가 false
(디폴트)이며, 이 컴퍼넌트상의 현재의 드롭 타겟이 null
인지, 사용자 설정의 드롭 타겟이 아닌 경우, 이 메소드는 드롭 타겟을 다음과 같이 변경합니다. newHandler
가 null
의 경우, 드롭 타겟을 소거합니다. null
가 아닌 경우는, 새로운 DropTarget
를 인스톨 합니다.
주:JWindow
와 조합해 사용했을 경우,TransferHandler
는 데이터의 임포트 기능 밖에 제공하지 않습니다. 이것은, 데이터의 export 관련의 메소드가 현재 JComponent
형이 되어 있기 (위해)때문에입니다.
자세한 것은, 「The Java Tutorial」의「How to Use Drag and Drop and Data Transfer」를 참조해 주세요.
newHandler
- 새로운 TransferHandler
TransferHandler
,
getTransferHandler()
,
Component.setDropTarget(java.awt.dnd.DropTarget)
public TransferHandler getTransferHandler()
transferHandler
프로퍼티을 돌려줍니다.
transferHandler
프로퍼티의 값TransferHandler
,
setTransferHandler(javax.swing.TransferHandler)
public void update(Graphics g)
paint(g)
를 호출합니다. 이 메소드는, 백그라운드를 클리어 하는 불필요한 호출을 하지 않게 하기 위해서 오버라이드(override) 되었습니다.
Container
내의 update
g
- 페인트 대상의 Graphics
문맥Component.update(Graphics)
protected void setRootPaneCheckingEnabled(boolean enabled)
add
및 setLayout
의 호출이 contentPane
에 전송 될지 어떨지를 설정합니다.
enabled
- add
및 setLayout
가 전송 되는 경우는 true,JWindow
로 직접 실행할 필요가 있는 경우는 falseaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
isRootPaneCheckingEnabled()
,
RootPaneContainer
protected void addImpl(Component comp, Object constraints, int index)
Component
를 추가합니다. 이 메소드를 오버라이드(override) 하면(자), 호출이 조건부로 contentPane
에 전송 됩니다. 디폴트에서는, 아이는 프레임은 아니고 contentPane
에 추가됩니다. 상세한 것에 대하여는,RootPaneContainer
를 참조해 주세요.
Container
내의 addImpl
comp
- 확장되는 컴퍼넌트constraints
- 준수되어야 할 제약index
- 인덱스
IllegalArgumentException
- index
가 무효인 경우
IllegalArgumentException
- 컨테이너의 부모를 그 컨테이너 자체에 추가하려고 하고 있는 경우
IllegalArgumentException
- 윈도우를 컨테이너에 추가하려고 하고 있는 경우setRootPaneCheckingEnabled(boolean)
,
RootPaneContainer
public void remove(Component comp)
comp
가 rootPane
가 아닌 경우는, 호출이 contentPane
에 전송 됩니다. comp
가 JWindow
또는 contentPane
의 아이가 아닌 경우는, 아무것도 행해지지 않습니다.
Container
내의 remove
comp
- 삭제되는 컴퍼넌트
NullPointerException
- comp
가 null 의 경우Container.add(java.awt.Component)
,
RootPaneContainer
public void setLayout(LayoutManager manager)
LayoutManager
를 설정합니다. 이 메소드를 오버라이드(override) 하면(자), 호출이 조건부로 contentPane
에 전송 됩니다. 상세한 것에 대하여는,RootPaneContainer
를 참조해 주세요.
Container
내의 setLayout
manager
- LayoutManager
setRootPaneCheckingEnabled(boolean)
,
RootPaneContainer
public JRootPane getRootPane()
rootPane
객체를 돌려줍니다.
RootPaneContainer
내의 getRootPane
rootPane
프로퍼티setRootPane(javax.swing.JRootPane)
,
RootPaneContainer.getRootPane()
protected void setRootPane(JRootPane root)
rootPane
객체를 설정합니다. 이 메소드는 생성자 에 의해 불려 갑니다.
root
- 새로운 rootPane
프로퍼티getRootPane()
public Container getContentPane()
contentPane
인 Container
를 돌려줍니다.
RootPaneContainer
내의 getContentPane
contentPane
프로퍼티setContentPane(java.awt.Container)
,
RootPaneContainer.getContentPane()
public void setContentPane(Container contentPane)
contentPane
프로퍼티을 설정합니다. 이 메소드는 생성자 에 의해 불려 갑니다.
RootPaneContainer
내의 setContentPane
contentPane
- 새로운 contentPane
IllegalComponentStateException
- 컨텐츠 구획 파라미터가 null
의 경우 (실행시 예외)getContentPane()
,
RootPaneContainer.setContentPane(java.awt.Container)
public JLayeredPane getLayeredPane()
layeredPane
객체를 돌려줍니다.
RootPaneContainer
내의 getLayeredPane
layeredPane
프로퍼티setLayeredPane(javax.swing.JLayeredPane)
,
RootPaneContainer.getLayeredPane()
public void setLayeredPane(JLayeredPane layeredPane)
layeredPane
프로퍼티을 설정합니다. 이 메소드는 생성자 에 의해 불려 갑니다.
RootPaneContainer
내의 setLayeredPane
layeredPane
- 새로운 layeredPane
객체
IllegalComponentStateException
- 컨텐츠 구획 파라미터가 null
의 경우 (실행시 예외)getLayeredPane()
,
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
public Component getGlassPane()
glassPane Component
를 돌려줍니다.
RootPaneContainer
내의 getGlassPane
glassPane
프로퍼티setGlassPane(java.awt.Component)
,
RootPaneContainer.getGlassPane()
public void setGlassPane(Component glassPane)
glassPane
프로퍼티을 설정합니다. 이 메소드는 생성자 에 의해 불려 갑니다.
RootPaneContainer
내의 setGlassPane
glassPane
- 이 윈도우 glassPane
객체getGlassPane()
,
RootPaneContainer.setGlassPane(java.awt.Component)
public Graphics getGraphics()
null
를 돌려줍니다.
Component
내의 getGraphics
null
Component.paint(java.awt.Graphics)
public void repaint(long time, int x, int y, int width, int height)
time
밀리 세컨드 이내에 재draw 합니다. 재페인트의 방법의 자세한 것은,RepaintManager
를 참조해 주세요.
Component
내의 repaint
time
- 갱신까지의 최대 시간 (밀리 세컨드)x
- x 좌표y
- y 좌표width
- 폭height
- 높이RepaintManager
protected String paramString()
JWindow
의 캐릭터 라인 표현을 돌려줍니다. 이 메소드는 디버그 전용이며, 반환되는 캐릭터 라인의 내용 및 형식은 구현에 따라서 다릅니다. 반환되는 캐릭터 라인은 빈 상태(empty)의 경우가 있습니다만,null
로는 되지 않습니다.
Container
내의 paramString
JWindow
캐릭터 라인 표현public AccessibleContext getAccessibleContext()
Accessible
내의 getAccessibleContext
Window
내의 getAccessibleContext
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.