|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog
public class JDialog
다이얼로그 윈도우를 작성하기 위한 메인 클래스입니다. 이 클래스를 사용해, 커스텀 다이얼로그를 생성하거나JOptionPane
로 다수의 클래스 메소드를 호출하거나 해, 다양한 표준 다이얼로그를 생성할 수 있습니다. 다이얼로그 작성의 상세한 것에 대하여는, 「The Java Tutorial」의「How to Make Dialogs」를 참조해 주세요.
JDialog
컴퍼넌트에는, 유일한 아이로서 JRootPane
가 포함됩니다. contentPane
는 JDialog
의 모든 아이의 부모가 될 필요가 있습니다. 편의상,add
와 그 파생 메소드,remove
및 setLayout
는, 필요에 따라서 contentPane
에 전송 되도록(듯이) 오버라이드(override) 되고 있습니다. 즉, 다음과 같이 기술할 수 있습니다.
dialog.add(child);아이는
contentPane
에 추가됩니다. contentPane
는 항상 null
이외입니다. null
로 설정하려고 하면(자), 예외가 생성됩니다. 디폴트의 contentPane
에는 BorderLayout
매니저가 설정되어 있습니다. JDialog
의 LayoutManager
의 추가, 삭제, 및 설정의 상세한 것에 대하여는,RootPaneContainer
를 참조해 주세요.
contentPane
,glassPane
, 및 layeredPane
컴퍼넌트의 상세한 것에 대하여는,JRootPane
의 설명을 참조해 주세요.
멀티스크린 환경에서는,JDialog
를 소유자와는 다른 스크린 디바이스상에 생성할 수가 있습니다. 자세한 것은,Frame
를 참조해 주세요.
경고: Swing 는 thread에 대해서 안전하지는 않습니다. 자세한 것은,「Swing's Threading Policy」를 참조해 주세요.
경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans™ 의 장기간의 운용 지원는,java.beans
패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder
를 참조해 주세요.
JOptionPane
,
JRootPane
,
RootPaneContainer
상자의 클래스의 개요 | |
---|---|
protected class |
JDialog.AccessibleJDialog
이 클래스는 JDialog 클래스용의 접근성? 지원를 구현하고 있습니다. |
클래스 java.awt. Dialog 로부터 상속된 상자의 클래스/인터페이스 |
---|
Dialog.AccessibleAWTDialog , Dialog.ModalExclusionType , Dialog.ModalityType |
클래스 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
|
protected boolean |
rootPaneCheckingEnabled
true 의 경우는, add 및 setLayout 의 호출이 contentPane 에 전송 됩니다. |
클래스 java.awt. Dialog 로부터 상속된 필드 |
---|
DEFAULT_MODALITY_TYPE |
클래스 java.awt. Component 로부터 상속된 필드 |
---|
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT |
인터페이스 javax.swing. WindowConstants 로부터 상속된 필드 |
---|
DISPOSE_ON_CLOSE , DO_NOTHING_ON_CLOSE , EXIT_ON_CLOSE , HIDE_ON_CLOSE |
인터페이스 java.awt.image. ImageObserver 로부터 상속된 필드 |
---|
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH |
생성자 의 개요 | |
---|---|
JDialog ()
타이틀이 없고, 소유자 Frame 의 지정도 없는 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Dialog owner)
소유자 Dialog 를 지정해, 타이틀이 없는 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Dialog owner,
boolean modal)
소유자 Dialog 와 모덜인가 어떤가를 지정해 다이얼로그를 작성합니다. |
|
JDialog (Dialog owner,
String title)
타이틀과 소유자 다이얼로그를 지정해, 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Dialog owner,
String title,
boolean modal)
타이틀, 모덜인가 부디 소유자 Dialog 를 지정해 다이얼로그를 작성합니다. |
|
JDialog (Dialog owner,
String title,
boolean modal,
GraphicsConfiguration gc)
타이틀, 소유자 Dialog , 모덜일지 어떨지, 및 GraphicsConfiguration 를 지정해 다이얼로그를 작성합니다. |
|
JDialog (Frame owner)
소유자 Frame 를 지정해, 타이틀이 없는 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Frame owner,
boolean modal)
소유자 Frame , 모덜일지 어떨지, 및 빈 상태(empty)의 타이틀을 지정해 다이얼로그를 작성합니다. |
|
JDialog (Frame owner,
String title)
타이틀과 소유자 프레임을 지정해, 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Frame owner,
String title,
boolean modal)
타이틀, 소유자 Frame , 및 모덜인가 어떤가를 지정해 다이얼로그를 작성합니다. |
|
JDialog (Frame owner,
String title,
boolean modal,
GraphicsConfiguration gc)
타이틀, 소유자 Frame , 모덜일지 어떨지, 및 GraphicsConfiguration 를 지정해 다이얼로그를 작성합니다. |
|
JDialog (Window owner)
소유자 Window 와 빈 상태(empty)의 타이틀을 지정해 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Window owner,
Dialog.ModalityType modalityType)
소유자 Window , 모덜일지 어떨지, 및 빈 상태(empty)의 타이틀을 지정해 다이얼로그를 작성합니다. |
|
JDialog (Window owner,
String title)
타이틀과 소유자 Window 를 지정해 비모덜 다이얼로그를 작성합니다. |
|
JDialog (Window owner,
String title,
Dialog.ModalityType modalityType)
타이틀, 소유자 Window , 및 모덜인가 어떤가를 지정해 다이얼로그를 작성합니다. |
|
JDialog (Window owner,
String title,
Dialog.ModalityType modalityType,
GraphicsConfiguration gc)
타이틀, 소유자 Window , 모덜일지 어떨지, 및 GraphicsConfiguration 를 지정해 다이얼로그를 작성합니다. |
메소드의 개요 | |
---|---|
protected void |
addImpl (Component comp,
Object constraints,
int index)
지정된 아이 Component 를 추가합니다. |
protected JRootPane |
createRootPane ()
생성자 메소드에 의해 불려 가 디폴트의 rootPane 를 작성합니다. |
protected void |
dialogInit ()
JDialog 를 적절히 초기화하기 위해서 생성자 에 의해 불려 갑니다. |
AccessibleContext |
getAccessibleContext ()
이 JDialog 에 관련한 AccessibleContext 를 돌려줍니다. |
Container |
getContentPane ()
이 다이얼로그의 contentPane 객체를 돌려줍니다. |
int |
getDefaultCloseOperation ()
사용자가 이 다이얼로그로 「클로즈」를 개시했을 때에 실행되는 처리를 돌려줍니다. |
Component |
getGlassPane ()
이 다이얼로그의 glassPane 객체를 돌려줍니다. |
Graphics |
getGraphics ()
이 컴퍼넌트의 그래픽스 문맥을 작성합니다. |
JMenuBar |
getJMenuBar ()
이 다이얼로그로 설정되어 있는 도구모음을 돌려줍니다. |
JLayeredPane |
getLayeredPane ()
이 다이얼로그의 layeredPane 객체를 돌려줍니다. |
JRootPane |
getRootPane ()
이 다이얼로그의 rootPane 객체를 돌려줍니다. |
TransferHandler |
getTransferHandler ()
transferHandler 프로퍼티을 돌려줍니다. |
static boolean |
isDefaultLookAndFeelDecorated ()
새롭게 생성되는 JDialog 의 현재의 Look & Feel (L&F)로 실행할 수 있는 윈도우 장식을 보관 유지하는 경우는 true 를 돌려줍니다. |
protected boolean |
isRootPaneCheckingEnabled ()
add 및 setLayout 의 호출이 contentPane 에 전송 될지 어떨지를 돌려줍니다. |
protected String |
paramString ()
이 JDialog 의 캐릭터 라인 표현을 돌려줍니다. |
protected void |
processWindowEvent (WindowEvent e)
defaultCloseOperation 프로퍼티 상태에 응해, 윈도우 이벤트를 처리합니다. |
void |
remove (Component comp)
지정된 컴퍼넌트를 컨테이너로부터 삭제합니다. |
void |
repaint (long time,
int x,
int y,
int width,
int height)
이 컴퍼넌트의 지정된 구형 영역을 time 밀리 세컨드 이내에 재draw 합니다. |
void |
setContentPane (Container contentPane)
contentPane 프로퍼티을 설정합니다. |
void |
setDefaultCloseOperation (int operation)
사용자가 이 다이얼로그의 「클로즈」를 개시했을 때에, 디폴트로 실행되는 처리를 설정합니다. |
static void |
setDefaultLookAndFeelDecorated (boolean defaultLookAndFeelDecorated)
새롭게 생성되는 JDialog 가, 현재의 Look & Feel (L&F)로 실행할 수 있는 경계, 윈도우 클로즈용 위젯, 타이틀등의 윈도우 장식을 보관 유지할지 어떨지의 힌트가 준비되어 있습니다. |
void |
setGlassPane (Component glassPane)
glassPane 프로퍼티을 설정합니다. |
void |
setJMenuBar (JMenuBar menu)
이 다이얼로그의 도구모음을 설정합니다. |
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) 를 호출합니다. |
클래스 java.awt. Dialog 로부터 상속된 메소드 |
---|
addNotify , getModalityType , getTitle , hide , isModal , isResizable , isUndecorated , setModal , setModalityType , setResizable , setTitle , setUndecorated , setVisible , show , toBack |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
필드의 상세 |
---|
protected JRootPane rootPane
getRootPane()
,
setRootPane(javax.swing.JRootPane)
protected boolean rootPaneCheckingEnabled
add
및 setLayout
의 호출이 contentPane
에 전송 됩니다. 처음은 false 입니다만,JDialog
가 구축되면(자), true 로 설정됩니다.
isRootPaneCheckingEnabled()
,
setRootPaneCheckingEnabled(boolean)
,
RootPaneContainer
protected AccessibleContext accessibleContext
생성자 의 상세 |
---|
public JDialog()
Frame
의 지정도 없는 비모덜 다이얼로그를 작성합니다. 공유되어, 숨은 프레임이 다이얼로그의 소유자로서 설정됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
주:이 생성자 에서는, 소유자 없음의 JDialog
를 작성할 수 없습니다. 소유자 없음의 JDialog
를 작성하려면 , 인수 null
를 지정해,JDialog(Window)
생성자 또는 JDialog(Dialog)
생성자 을 사용합니다.
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Frame owner)
Frame
를 지정해, 타이틀이 없는 비모덜 다이얼로그를 작성합니다. owner
가 null
의 경우, 공유의 비표시 프레임이 다이얼로그의 소유자로서 설정됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
주:이 생성자 에서는, 소유자 없음의 JDialog
를 작성할 수 없습니다. 소유자 없음의 JDialog
를 작성하려면 , 인수 null
를 지정해,JDialog(Window)
생성자 또는 JDialog(Dialog)
생성자 을 사용합니다.
owner
- 다이얼로그를 표시하는 Frame
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Frame owner, boolean modal)
Frame
, 모덜일지 어떨지, 및 빈 상태(empty)의 타이틀을 지정해 다이얼로그를 작성합니다. owner
가 null
의 경우, 공유의 비표시 프레임이 다이얼로그의 소유자로서 설정됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
주:이 생성자 에서는, 소유자 없음의 JDialog
를 작성할 수 없습니다. 소유자 없음의 JDialog
를 작성하려면 , 인수 null
를 지정해,JDialog(Window)
생성자 또는 JDialog(Dialog)
생성자 을 사용합니다.
owner
- 다이얼로그를 표시하는 Frame
modal
- 다이얼로그가 표시되고 있을 때, 사용자외의 톱 레벨 윈도우에의 입력을
블록 할지 어떨지를 지정한다. true
의 경우, 모다리티타이프프로파티는 DEFAULT_MODALITY_TYPE
로 설정된다. 그렇지 않은 경우, 비모덜 다이얼로그가 된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Frame owner, String title)
owner
가 null
의 경우, 공유의 비표시 프레임이 다이얼로그의 소유자로서 설정됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
주:이 생성자 에서는, 소유자 없음의 JDialog
를 작성할 수 없습니다. 소유자 없음의 JDialog
를 작성하려면 , 인수 null
를 지정해,JDialog(Window)
생성자 또는 JDialog(Dialog)
생성자 을 사용합니다.
owner
- 다이얼로그를 표시하는 Frame
title
- 다이얼로그의 타이틀 바에 표시되는 String
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Frame owner, String title, boolean modal)
Frame
, 및 모덜인가 어떤가를 지정해 다이얼로그를 작성합니다. owner
가 null
의 경우, 공유의 비표시 프레임이 다이얼로그의 소유자로서 설정됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
주:모덜 다이얼로그내에 작성된 pop-up 컴퍼넌트 (JComboBox
,JPopupMenu
,JMenuBar
)는, 경량 컴퍼넌트가 됩니다.
주:이 생성자 에서는, 소유자 없음의 JDialog
를 작성할 수 없습니다. 소유자 없음의 JDialog
를 작성하려면 , 인수 null
를 지정해,JDialog(Window)
생성자 또는 JDialog(Dialog)
생성자 을 사용합니다.
owner
- 다이얼로그를 표시하는 Frame
title
- 다이얼로그의 타이틀 바에 표시되는 String
modal
- 다이얼로그가 표시되고 있을 때, 사용자외의 톱 레벨 윈도우에의 입력을
블록 할지 어떨지를 지정한다. true
의 경우, 모다리티타이프프로파티는 DEFAULT_MODALITY_TYPE
로 설정된다. 그렇지 않은 경우, 비모덜 다이얼로그가 된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.ModalityType.MODELESS
,
Dialog.DEFAULT_MODALITY_TYPE
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc)
Frame
, 모덜일지 어떨지, 및 GraphicsConfiguration
를 지정해 다이얼로그를 작성합니다. owner
가 null
의 경우, 공유의 비표시 프레임이 다이얼로그의 소유자로서 설정됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
주:모덜 다이얼로그내에 작성된 pop-up 컴퍼넌트 (JComboBox
,JPopupMenu
,JMenuBar
)는, 경량 컴퍼넌트가 됩니다.
주:이 생성자 에서는, 소유자 없음의 JDialog
를 작성할 수 없습니다. 소유자 없음의 JDialog
를 작성하려면 , 인수 null
를 지정해,JDialog(Window)
생성자 또는 JDialog(Dialog)
생성자 을 사용합니다.
owner
- 다이얼로그를 표시하는 Frame
title
- 다이얼로그의 타이틀 바에 표시되는 String
modal
- 다이얼로그가 표시되고 있을 때, 사용자외의 톱 레벨 윈도우에의 입력을
블록 할지 어떨지를 지정한다. true
의 경우, 모다리티타이프프로파티는 DEFAULT_MODALITY_TYPE
로 설정된다. 그렇지 않은 경우, 비모덜 다이얼로그가 되는gc
- 타겟 스크린 디바이스의 GraphicsConfiguration
. gc
가 null
의 경우는, 같은 GraphicsConfiguration
를 소유 프레임으로서 사용
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.ModalityType.MODELESS
,
Dialog.DEFAULT_MODALITY_TYPE
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Dialog owner)
Dialog
를 지정해, 타이틀이 없는 비모덜 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 소유자 Dialog
. 이 다이얼로그에 소유자가 없는 경우는 null
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Dialog owner, boolean modal)
Dialog
와 모덜인가 어떤가를 지정해 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 소유자 Dialog
. 이 다이얼로그에 소유자가 없는 경우는 null
modal
- 다이얼로그가 표시되고 있을 때, 사용자외의 톱 레벨 윈도우에의 입력을
블록 할지 어떨지를 지정한다. true
의 경우, 모다리티타이프프로파티는 DEFAULT_MODALITY_TYPE
로 설정된다. 그렇지 않은 경우, 비모덜 다이얼로그가 된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.ModalityType.MODELESS
,
Dialog.DEFAULT_MODALITY_TYPE
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Dialog owner, String title)
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 소유자 Dialog
. 이 다이얼로그에 소유자가 없는 경우는 null
title
- 다이얼로그의 타이틀 바에 표시되는 String
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Dialog owner, String title, boolean modal)
Dialog
를 지정해 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 소유자 Dialog
. 이 다이얼로그에 소유자가 없는 경우는 null
title
- 다이얼로그의 타이틀 바에 표시되는 String
modal
- 다이얼로그가 표시되고 있을 때, 사용자외의 톱 레벨 윈도우에의 입력을
블록 할지 어떨지를 지정한다. true
의 경우, 모다리티타이프프로파티는 DEFAULT_MODALITY_TYPE
로 설정된다. 그렇지 않은 경우, 비모덜 다이얼로그가 된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.ModalityType.MODELESS
,
Dialog.DEFAULT_MODALITY_TYPE
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc)
Dialog
, 모덜일지 어떨지, 및 GraphicsConfiguration
를 지정해 다이얼로그를 작성합니다.
주:모덜 다이얼로그내에 작성된 pop-up 컴퍼넌트 (JComboBox
,JPopupMenu
,JMenuBar
)는, 경량 컴퍼넌트가 됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 소유자 Dialog
. 이 다이얼로그에 소유자가 없는 경우는 null
title
- 다이얼로그의 타이틀 바에 표시되는 String
modal
- 다이얼로그가 표시되고 있을 때, 사용자외의 톱 레벨 윈도우에의 입력을
블록 할지 어떨지를 지정한다. true
의 경우, 모다리티타이프프로파티는 DEFAULT_MODALITY_TYPE
로 설정된다. 그렇지 않은 경우, 비모덜 다이얼로그가 되는gc
- 타겟 스크린 디바이스의 GraphicsConfiguration
. gc
가 null
의 경우는, 같은 GraphicsConfiguration
를 소유 다이얼로그로서 사용
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.ModalityType.MODELESS
,
Dialog.DEFAULT_MODALITY_TYPE
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Window owner)
Window
와 빈 상태(empty)의 타이틀을 지정해 비모덜 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 Window
. 이 다이얼로그에 소유자가 없는 경우는 null
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Window owner, Dialog.ModalityType modalityType)
Window
, 모덜일지 어떨지, 및 빈 상태(empty)의 타이틀을 지정해 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 Window
. 이 다이얼로그에 소유자가 없는 경우는 null
modalityType
- 다이얼로그가 표시되고 있을 때, 다른 윈도우에의 입력을
블록 할지 어떨지를 지정한다. null
치와 지원되지 않는 모덜형은,
MODELESS
와 동등
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Window owner, String title)
Window
를 지정해 비모덜 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 Window
. 이 다이얼로그에 소유자가 없는 경우는 null
title
- 다이얼로그의 타이틀 바에 표시되는 String
. 다이얼로그에 타이틀이 없는 경우는 null
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Window owner, String title, Dialog.ModalityType modalityType)
Window
, 및 모덜인가 어떤가를 지정해 다이얼로그를 작성합니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 Window
. 이 다이얼로그에 소유자가 없는 경우는 null
title
- 다이얼로그의 타이틀 바에 표시되는 String
. 다이얼로그에 타이틀이 없는 경우는 null
modalityType
- 다이얼로그가 표시되고 있을 때, 다른 윈도우에의 입력을
블록 할지 어떨지를 지정한다. null
치와 지원되지 않는 모덜형은,
MODELESS
와 동등
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JDialog(Window owner, String title, Dialog.ModalityType modalityType, GraphicsConfiguration gc)
Window
, 모덜일지 어떨지, 및 GraphicsConfiguration
를 지정해 다이얼로그를 작성합니다.
주:모덜 다이얼로그내에 작성된 pop-up 컴퍼넌트 (JComboBox
,JPopupMenu
,JMenuBar
)는, 경량 컴퍼넌트가 됩니다.
이 생성자 은 컴퍼넌트의 로컬 프로퍼티을 JComponent.getDefaultLocale
에 의해 반환된 값으로 설정합니다.
owner
- 다이얼로그를 표시하는 Window
. 이 다이얼로그에 소유자가 없는 경우는 null
title
- 다이얼로그의 타이틀 바에 표시되는 String
. 다이얼로그에 타이틀이 없는 경우는 null
modalityType
- 다이얼로그가 표시되고 있을 때, 다른 윈도우에의 입력을
블록 할지 어떨지를 지정한다. null
치와 지원되지 않는 모덜형은,
MODELESS
와 동등gc
- 타겟 스크린 디바이스의 GraphicsConfiguration
. null
의 경우, 소유 윈도우의 GraphicsConfiguration
가 사용된다. owner
도 null
의 경우, 시스템의 디폴트의 GraphicsConfiguration
가 사용된다
HeadlessException
- GraphicsEnvironment.isHeadless()
가 true
를 돌려주는 경우Dialog.ModalityType
,
Dialog.setModal(boolean)
,
Dialog.setModalityType(java.awt.Dialog.ModalityType)
,
GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
메소드의 상세 |
---|
protected void dialogInit()
JDialog
를 적절히 초기화하기 위해서 생성자 에 의해 불려 갑니다.
protected JRootPane createRootPane()
rootPane
를 작성합니다.
protected void processWindowEvent(WindowEvent e)
defaultCloseOperation
프로퍼티 상태에 응해, 윈도우 이벤트를 처리합니다.
Window
내의 processWindowEvent
e
- 윈도우 이벤트setDefaultCloseOperation(int)
public void setDefaultCloseOperation(int operation)
DO_NOTHING_ON_CLOSE
(WindowConstants
에 정의):아무것도 실시하지 않는다. 프로그램은 등록되어 있는 WindowListener
객체의 windowClosing
메소드로 처리를 실시할 필요가 있다
HIDE_ON_CLOSE
(WindowConstants
에 정의):등록되어 있는 임의의 WindowListener
객체를 호출한 후에, 자동적으로 다이얼로그를 숨긴다.
DISPOSE_ON_CLOSE
(WindowConstants
에 정의):등록되어 있는 임의의 WindowListener
객체를 호출한 후에, 자동적으로 다이얼로그를 숨겨 파기한다.
디폴트에서는 HIDE_ON_CLOSE
가 설정됩니다. 이 프로퍼티의 값을 변경하면(자), 프로퍼티명 defaultCloseOperation 로 프로퍼티 변경 이벤트가 트리거됩니다.
주:Java 가상 머신 (VM) 내에서 마지막 표시 가능한 윈도우가 파기되면(자), VM 가 종료되는 일이 있습니다. 상세한 것에 대하여는,「AWT Threading Issues」를 참조해 주세요.
operation
- 사용자가 다이얼로그를 다물 때
실행되어야 할 처리
IllegalArgumentException
- defaultCloseOperation 의 값이 전술의
유효한 값과 다른 경우Window.addWindowListener(java.awt.event.WindowListener)
,
getDefaultCloseOperation()
,
WindowConstants
public int getDefaultCloseOperation()
setDefaultCloseOperation(int)
public void setTransferHandler(TransferHandler newHandler)
transferHandler
프로퍼티을 설정합니다. 컴퍼넌트가 데이터 전송 조작을 지원하지 않는 경우,null
를 사용합니다.
시스템 프로퍼티 suppressSwingDropSupport
가 false
(디폴트)이며, 이 컴퍼넌트상의 현재의 드롭 타겟이 null
인지, 사용자 설정의 드롭 타겟이 아닌 경우, 이 메소드는 드롭 타겟을 다음과 같이 변경합니다. newHandler
가 null
의 경우, 드롭 타겟을 소거합니다. null
가 아닌 경우는, 새로운 DropTarget
를 인스톨 합니다.
주:JDialog
와 조합해 사용했을 경우,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)
public void setJMenuBar(JMenuBar menu)
menu
- 다이얼로그내에 배치되고 있는 도구모음getJMenuBar()
public JMenuBar getJMenuBar()
setJMenuBar(javax.swing.JMenuBar)
protected boolean isRootPaneCheckingEnabled()
add
및 setLayout
의 호출이 contentPane
에 전송 될지 어떨지를 돌려줍니다.
add
및 setLayout
가 전송 되는 경우는 true, 그렇지 않은 경우는 falseaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
setRootPaneCheckingEnabled(boolean)
,
RootPaneContainer
protected void setRootPaneCheckingEnabled(boolean enabled)
add
및 setLayout
의 호출이 contentPane
에 전송 될지 어떨지를 설정합니다.
enabled
- add
및 setLayout
가 전송 되는 경우는 true,JDialog
로 직접 실행할 필요가 있는 경우는 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
가 JDialog
또는 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
setRootPane(javax.swing.JRootPane)
,
RootPaneContainer.getRootPane()
protected void setRootPane(JRootPane root)
rootPane
프로퍼티을 설정합니다. 이 메소드는 생성자 에 의해 불려 갑니다.
root
- 이 다이얼로그의 rootPane
객체getRootPane()
public Container getContentPane()
contentPane
객체를 돌려줍니다.
RootPaneContainer
내의 getContentPane
contentPane
프로퍼티setContentPane(java.awt.Container)
,
RootPaneContainer.getContentPane()
public void setContentPane(Container contentPane)
contentPane
프로퍼티을 설정합니다. 이 메소드는 생성자 에 의해 불려 갑니다.
Swing 의 페인트 아키텍쳐(architecture)에서는, 포함 관계의 계층에 불투명한 JComponent
가 포함되어 있을 필요가 있습니다. 일반적으로, 이것은 컨텐츠 구획이야는 제공됩니다. 컨텐츠 구획을 옮겨놓는 경우는, 불투명한 JComponent
와 옮겨놓는 것을 추천합니다.
RootPaneContainer
내의 setContentPane
contentPane
- 이 다이얼로그의 contentPane
객체
IllegalComponentStateException
- 컨텐츠 구획 파라미터가 null
의 경우 (실행시 예외)JRootPane
,
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
객체를 돌려줍니다.
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
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
JDialog
가, 현재의 Look & Feel (L&F)로 실행할 수 있는 경계, 윈도우 클로즈용 위젯, 타이틀등의 윈도우 장식을 보관 유지할지 어떨지의 힌트가 준비되어 있습니다. defaultLookAndFeelDecorated
가 true 의 경우, 현재의 LookAndFeel
가 윈도우 장식을 지원해, 현재의 윈도우 매니저-가 장식의 없는 윈도우를 지원하기 위해(때문에), 새롭게 생성되는 JDialog
는, 현재의 LookAndFeel
로 실행할 수 있는 윈도우 장식을 보관 유지합니다. 이 값이 false 의 경우는, 새롭게 생성되는 JDialog
는 현재의 윈도우 매니저-로 실행할 수 있는 윈도우 장식을 보관 유지합니다. 다음의 코드를 실행하면(자), 단일의 JDialog 의 경우와 같은 결과가 됩니다.
JDialog dialog = new JDialog(); dialog.setUndecorated(true); dialog.getRootPane(). setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
defaultLookAndFeelDecorated
- 현재의 Look & Feel 가 윈도우 장식을
제공할지 어떨지의 힌트LookAndFeel.getSupportsWindowDecorations()
public static boolean isDefaultLookAndFeelDecorated()
JDialog
의 현재의 Look & Feel (L&F)로 실행할 수 있는 윈도우 장식을 보관 유지하는 경우는 true 를 돌려줍니다. 이것은 단순한 힌트이며, Look & Feel 가 이 기능을 지원하지 않는 경우도 있습니다.
protected String paramString()
JDialog
의 캐릭터 라인 표현을 돌려줍니다. 이 메소드는 디버그 전용이며, 반환되는 캐릭터 라인의 내용 및 형식은 구현에 따라서 다릅니다. 반환되는 캐릭터 라인은 빈 상태(empty)의 경우가 있습니다만,null
로는 되지 않습니다.
Dialog
내의 paramString
JDialog
의 캐릭터 라인 표현public AccessibleContext getAccessibleContext()
Accessible
내의 getAccessibleContext
Dialog
내의 getAccessibleContext
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.