JavaTM Platform
Standard Ed. 6

java.awt
클래스 FileDialog

java.lang.Object 
  상위를 확장 java.awt.Component 
      상위를 확장 java.awt.Container 
          상위를 확장 java.awt.Window 
              상위를 확장 java.awt.Dialog 
                  상위를 확장 java.awt.FileDialog
모든 구현된 인터페이스:
ImageObserver , MenuContainer , Serializable , Accessible


public class FileDialog
extends Dialog

FileDialog 클래스는, 사용자가 파일을 선택할 수 있는 다이얼로그 윈도우를 표시합니다.  

이 다이얼로그는 모덜이기 (위해)때문에, 어플리케이션이 그 show 메소드를 호출해 이 다이얼로그를 표시하면(자), 사용자가 파일을 선택할 때까지 어플리케이션외의 부분은 사용할 수 없습니다.

도입된 버젼:
JDK1. 0
관련 항목:
Window.show() , 직렬화 된 형식

상자의 클래스의 개요
 
클래스 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
 
필드의 개요
static int LOAD
          이 정수치는, 파일 다이얼로그 윈도우의 목적이 읽어들여 용파일의 검색인 것을 나타냅니다.
static int SAVE
          이 정수치는, 파일 다이얼로그 윈도우의 목적이 기입해 용파일의 검색인 것을 나타냅니다.
 
클래스 java.awt. Dialog 로부터 상속된 필드
DEFAULT_MODALITY_TYPE
 
클래스 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
 
생성자 의 개요
FileDialog (Dialog  parent)
          파일을 로드하기 위한 파일 다이얼로그를 생성합니다.
FileDialog (Dialog  parent, String  title)
          지정된 타이틀을 사용해, 파일을 로드하기 위한 파일 다이얼로그 윈도우를 생성합니다.
FileDialog (Dialog  parent, String  title, int mode)
          지정된 타이틀을 사용해, 파일을 로드 또는 보존하기 위한 파일 다이얼로그 윈도우를 생성합니다.
FileDialog (Frame  parent)
          파일을 로드하기 위한 파일 다이얼로그를 생성합니다.
FileDialog (Frame  parent, String  title)
          지정된 타이틀을 사용해, 파일을 로드하기 위한 파일 다이얼로그 윈도우를 생성합니다.
FileDialog (Frame  parent, String  title, int mode)
          지정된 타이틀을 사용해, 파일을 로드 또는 보존하기 위한 파일 다이얼로그 윈도우를 생성합니다.
 
메소드의 개요
 void addNotify ()
          파일 다이얼로그의 피어를 작성합니다.
 String getDirectory ()
          이 파일 다이얼로그의 디렉토리를 돌려줍니다.
 String getFile ()
          이 파일 다이얼로그의 선택되고 있는 파일을 돌려줍니다.
 FilenameFilter getFilenameFilter ()
          이 파일 다이얼로그의 파일명 필터를 조사합니다.
 int getMode ()
          이 파일 다이알로그 박스가 파일로부터 로드하기 위한 것인가, 파일에 보존하기 위한의 것인지를 나타냅니다.
protected  String paramString ()
          이 FileDialog 윈도우 상태를 나타내는 캐릭터 라인을 돌려줍니다.
 void setDirectory (String  dir)
          이 파일 다이얼로그 윈도우의 디렉토리를, 지정된 디렉토리로 설정합니다.
 void setFile (String  file)
          이 파일 다이얼로그 윈도우의 선택되고 있는 파일을, 지정된 파일로 설정합니다.
 void setFilenameFilter (FilenameFilter  filter)
          파일 다이얼로그 윈도우의 파일명 필터가 지정된 필터로 설정합니다.
 void setMode (int mode)
          파일 다이얼로그의 모드를 설정합니다.
 
클래스 java.awt. Dialog 로부터 상속된 메소드
getAccessibleContext , getModalityType , getTitle , hide , isModal , isResizable , isUndecorated , setModal , setModalityType , setResizable , setTitle , setUndecorated , setVisible , show , toBack
 
클래스 java.awt. Window 로부터 상속된 메소드
addPropertyChangeListener , addPropertyChangeListener , addWindowFocusListener , addWindowListener , addWindowStateListener , applyResourceBundle , applyResourceBundle , createBufferStrategy , createBufferStrategy , dispose , getBufferStrategy , getFocusableWindowState , getFocusCycleRootAncestor , getFocusOwner , getFocusTraversalKeys , getGraphicsConfiguration , getIconImages , getInputContext , getListeners , getLocale , getModalExclusionType , getMostRecentFocusOwner , getOwnedWindows , getOwner , getOwnerlessWindows , getToolkit , getWarningString , getWindowFocusListeners , getWindowListeners , getWindows , getWindowStateListeners , isActive , isAlwaysOnTop , isAlwaysOnTopSupported , isFocusableWindow , isFocusCycleRoot , isFocused , isLocationByPlatform , isShowing , pack , postEvent , processEvent , processWindowEvent , processWindowFocusEvent , processWindowStateEvent , removeNotify , removeWindowFocusListener , removeWindowListener , removeWindowStateListener , reshape , setAlwaysOnTop , setBounds , setBounds , setCursor , setFocusableWindowState , setFocusCycleRoot , setIconImage , setIconImages , setLocationByPlatform , setLocationRelativeTo , setMinimumSize , setModalExclusionType , setSize , setSize , toFront
 
클래스 java.awt. Container 로부터 상속된 메소드
add , add , add , add , add , addContainerListener , addImpl , applyComponentOrientation , areFocusTraversalKeysSet , countComponents , deliverEvent , doLayout , findComponentAt , findComponentAt , getAlignmentX , getAlignmentY , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getComponentZOrder , getContainerListeners , getFocusTraversalPolicy , getInsets , getLayout , getMaximumSize , getMinimumSize , getMousePosition , getPreferredSize , insets , invalidate , isAncestorOf , isFocusCycleRoot , isFocusTraversalPolicyProvider , isFocusTraversalPolicySet , layout , list , list , locate , minimumSize , paint , paintComponents , preferredSize , print , printComponents , processContainerEvent , remove , remove , removeAll , removeContainerListener , setComponentZOrder , setFocusTraversalKeys , setFocusTraversalPolicy , setFocusTraversalPolicyProvider , setFont , setLayout , transferFocusBackward , transferFocusDownCycle , update , validate , validateTree
 
클래스 java.awt. Component 로부터 상속된 메소드
action , add , addComponentListener , addFocusListener , addHierarchyBoundsListener , addHierarchyListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addMouseWheelListener , bounds , checkImage , checkImage , coalesceEvents , contains , contains , createImage , createImage , createVolatileImage , createVolatileImage , disable , disableEvents , dispatchEvent , enable , enable , enableEvents , enableInputMethods , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , getBackground , getBaseline , getBaselineResizeBehavior , getBounds , getBounds , getColorModel , getComponentListeners , getComponentOrientation , getCursor , getDropTarget , getFocusListeners , getFocusTraversalKeysEnabled , getFont , getFontMetrics , getForeground , getGraphics , getHeight , getHierarchyBoundsListeners , getHierarchyListeners , getIgnoreRepaint , getInputMethodListeners , getInputMethodRequests , getKeyListeners , getLocation , getLocation , getLocationOnScreen , getMouseListeners , getMouseMotionListeners , getMousePosition , getMouseWheelListeners , getName , getParent , getPeer , getPropertyChangeListeners , getPropertyChangeListeners , getSize , getSize , getTreeLock , getWidth , getX , getY , gotFocus , handleEvent , hasFocus , imageUpdate , inside , isBackgroundSet , isCursorSet , isDisplayable , isDoubleBuffered , isEnabled , isFocusable , isFocusOwner , isFocusTraversable , isFontSet , isForegroundSet , isLightweight , isMaximumSizeSet , isMinimumSizeSet , isOpaque , isPreferredSizeSet , isValid , isVisible , keyDown , keyUp , list , list , list , location , lostFocus , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paintAll , prepareImage , prepareImage , printAll , processComponentEvent , processFocusEvent , processHierarchyBoundsEvent , processHierarchyEvent , processInputMethodEvent , processKeyEvent , processMouseEvent , processMouseMotionEvent , processMouseWheelEvent , remove , removeComponentListener , removeFocusListener , removeHierarchyBoundsListener , removeHierarchyListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removeMouseWheelListener , removePropertyChangeListener , removePropertyChangeListener , repaint , repaint , repaint , repaint , requestFocus , requestFocus , requestFocusInWindow , requestFocusInWindow , resize , resize , setBackground , setComponentOrientation , setDropTarget , setEnabled , setFocusable , setFocusTraversalKeysEnabled , setForeground , setIgnoreRepaint , setLocale , setLocation , setLocation , setMaximumSize , setName , setPreferredSize , show , size , toString , transferFocus , transferFocusUpCycle
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

필드의 상세

LOAD

public static final int LOAD
이 정수치는, 파일 다이얼로그 윈도우의 목적이 읽어들여 용파일의 검색인 것을 나타냅니다.

관련 항목:
정수 필드치

SAVE

public static final int SAVE
이 정수치는, 파일 다이얼로그 윈도우의 목적이 기입해 용파일의 검색인 것을 나타냅니다.

관련 항목:
정수 필드치
생성자 의 상세

FileDialog

public FileDialog(Frame  parent)
파일을 로드하기 위한 파일 다이얼로그를 생성합니다. 파일 다이얼로그의 타이틀은 처음은 빈 상태(empty)입니다. 이것은 FileDialog(parent, "", LOAD) 의 편리한 메소드입니다.

파라미터:
parent - 다이얼로그의 소유자
도입된 버젼:
JDK1. 1

FileDialog

public FileDialog(Frame  parent,
                  String  title)
지정된 타이틀을 사용해, 파일을 로드하기 위한 파일 다이얼로그 윈도우를 생성합니다. 현재의 디렉토리의 파일이 표시됩니다. 이것은 FileDialog(parent, title, LOAD) 의 편리한 메소드입니다.

파라미터:
parent - 다이얼로그의 소유자
title - 다이얼로그의 타이틀

FileDialog

public FileDialog(Frame  parent,
                  String  title,
                  int mode)
지정된 타이틀을 사용해, 파일을 로드 또는 보존하기 위한 파일 다이얼로그 윈도우를 생성합니다.  

mode 의 값이 LOAD 의 경우, 파일 다이얼로그는 읽어들여 용무의 파일을 검색합니다. mode 의 값이 SAVE 의 경우, 파일 다이얼로그는 파일의 기입처를 검색합니다.

파라미터:
parent - 다이얼로그의 소유자
title - 다이얼로그의 타이틀
mode - 이 다이얼로그의 모드. FileDialog.LOAD 또는 FileDialog.SAVE
예외:
IllegalArgumentException - 파일 다이얼로그의 모드가 부당한 경우
관련 항목:
LOAD , SAVE

FileDialog

public FileDialog(Dialog  parent)
파일을 로드하기 위한 파일 다이얼로그를 생성합니다. 파일 다이얼로그의 타이틀은 처음은 빈 상태(empty)입니다. 이것은 FileDialog(parent, "", LOAD) 의 편리한 메소드입니다.

파라미터:
parent - 다이얼로그의 소유자
예외:
IllegalArgumentException - parentGraphicsConfiguration 이 스크린 디바이스에 의하지 않는 경우
IllegalArgumentException - parentnull 의 경우. 이 예외는 GraphicsEnvironment.isHeadlesstrue true 를 돌려주는 경우, 항상 throw 되는
도입된 버젼:
1.5
관련 항목:
GraphicsEnvironment.isHeadless()

FileDialog

public FileDialog(Dialog  parent,
                  String  title)
지정된 타이틀을 사용해, 파일을 로드하기 위한 파일 다이얼로그 윈도우를 생성합니다. 현재의 디렉토리의 파일이 표시됩니다. 이것은 FileDialog(parent, title, LOAD) 의 편리한 메소드입니다.

파라미터:
parent - 다이얼로그의 소유자
title - 다이얼로그의 타이틀. null 치도 지정 가능하고, NullPointerException 는 throw 되지 않는다
예외:
IllegalArgumentException - parentGraphicsConfiguration 이 스크린 디바이스에 의하지 않는 경우
IllegalArgumentException - parentnull 의 경우. 이 예외는 GraphicsEnvironment.isHeadlesstrue true 를 돌려주는 경우, 항상 throw 되는
도입된 버젼:
1.5
관련 항목:
GraphicsEnvironment.isHeadless()

FileDialog

public FileDialog(Dialog  parent,
                  String  title,
                  int mode)
지정된 타이틀을 사용해, 파일을 로드 또는 보존하기 위한 파일 다이얼로그 윈도우를 생성합니다.  

mode 의 값이 LOAD 의 경우, 파일 다이얼로그는 읽어들여 용무의 파일을 검색합니다. mode 의 값이 SAVE 의 경우, 파일 다이얼로그는 파일의 기입처를 검색합니다.

파라미터:
parent - 다이얼로그의 소유자
title - 다이얼로그의 타이틀. null 치도 지정 가능하고, NullPointerException 는 throw 되지 않는
mode - 이 다이얼로그의 모드. FileDialog.LOAD 또는 FileDialog.SAVE
예외:
IllegalArgumentException - 파일 다이얼로그의 모드가 부당한 경우
IllegalArgumentException - parentGraphicsConfiguration 이 스크린 디바이스에 의하지 않는 경우
IllegalArgumentException - parentnull 의 경우. 이 예외는 GraphicsEnvironment.isHeadlesstrue true 를 돌려주는 경우, 항상 throw 되는
도입된 버젼:
1.5
관련 항목:
GraphicsEnvironment.isHeadless() , LOAD , SAVE
메소드의 상세

addNotify

public void addNotify()
파일 다이얼로그의 피어를 작성합니다. 파일 다이얼로그의 기능을 변경하지 않고 , 그 외관의 변경을 가능하게 합니다.

오버라이드(override):
클래스 Dialog 내의 addNotify
관련 항목:
Component.isDisplayable() , Window.removeNotify()

getMode

public int getMode()
이 파일 다이알로그 박스가 파일로부터 로드하기 위한 것인가, 파일에 보존하기 위한의 것인지를 나타냅니다.

반환값:
이 파일 다이얼로그 윈도우의 모드. FileDialog.LOAD 또는 FileDialog.SAVE
관련 항목:
LOAD , SAVE , setMode(int)

setMode

public void setMode(int mode)
파일 다이얼로그의 모드를 설정합니다. mode 가 부당한 값의 경우는 예외가 throw 되어mode 는 설정되지 않습니다.

파라미터:
mode - 이 파일 다이얼로그의 모드. FileDialog.LOAD 또는 FileDialog.SAVE
예외:
IllegalArgumentException - 파일 다이얼로그의 모드가 부당한 경우
도입된 버젼:
JDK1. 1
관련 항목:
LOAD , SAVE , getMode()

getDirectory

public String  getDirectory()
이 파일 다이얼로그의 디렉토리를 돌려줍니다.

반환값:
FileDialog 의 디렉토리. null 의 경우나 무효인 디렉토리의 경우도 있는
관련 항목:
setDirectory(java.lang.String)

setDirectory

public void setDirectory(String  dir)
이 파일 다이얼로그 윈도우의 디렉토리를, 지정된 디렉토리로 설정합니다. null 또는 무효인 디렉토리를 지정하면(자), 시스템으로 정의되고 있는 디폴트로 설정됩니다. 다만, 이 디폴트는 사용자가 파일을 선택했을 때에 설정됩니다. 그 때까지는,getDirectory() 는 이 메소드에게 건네진 값을 돌려줍니다.  

디렉토리로서 "" 를 지정하면(자),null 로 설정됩니다.

파라미터:
dir - 지정된 디렉토리
관련 항목:
getDirectory()

getFile

public String  getFile()
이 파일 다이얼로그의 선택되고 있는 파일을 돌려줍니다. CANCEL 를 선택하면(자) null 가 돌려주어집니다.

반환값:
이 파일 다이얼로그 윈도우의 현재 선택되고 있는 파일. 파일이 선택되어 있지 않은 경우는 null
관련 항목:
setFile(java.lang.String)

setFile

public void setFile(String  file)
이 파일 다이얼로그 윈도우의 선택되고 있는 파일을, 지정된 파일로 설정합니다. 이 파일은, 파일 다이얼로그 윈도우가 최초로 표시되기 전으로 설정되어 있는 경우는 디폴트 파일이 됩니다.  

파일로서 "" 를 지정하면(자),null 로 설정됩니다.

파라미터:
file - 설정되는 파일
관련 항목:
getFile()

getFilenameFilter

public FilenameFilter  getFilenameFilter()
이 파일 다이얼로그의 파일명 필터를 조사합니다. 파일명 필터를 사용하면(자), 사용자는 파일 다이얼로그에 표시되는 파일을 한정할 수 있습니다. 파일명 필터는, Microsoft Windows 용의 Sun 의 참조 구현에서는 기능하지 않습니다.

반환값:
이 파일 다이얼로그의 파일명 필터
관련 항목:
FilenameFilter , setFilenameFilter(java.io.FilenameFilter)

setFilenameFilter

public void setFilenameFilter(FilenameFilter  filter)
파일 다이얼로그 윈도우의 파일명 필터가 지정된 필터로 설정합니다. 파일명 필터는, Microsoft Windows 용의 Sun 의 참조 구현에서는 기능하지 않습니다.

파라미터:
filter - 지정된 필터
관련 항목:
FilenameFilter , getFilenameFilter()

paramString

protected String  paramString()
FileDialog 윈도우 상태를 나타내는 캐릭터 라인을 돌려줍니다. 이 메소드는 디버그 전용이며, 반환되는 캐릭터 라인의 내용 및 형식은 구현에 따라서 다릅니다. 반환되는 캐릭터 라인은 빈 상태(empty)의 경우가 있습니다만,null 로는 되지 않습니다.

오버라이드(override):
클래스 Dialog 내의 paramString
반환값:
이 파일 다이얼로그 윈도우의 파라미터 캐릭터 라인

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.