|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjava.beans.PropertyEditorManager
public class PropertyEditorManager
PropertyEditorManager 는, 지정된 형명의 프로퍼티 에디터를 찾아내기 위해서(때문에) 사용할 수 있습니다. 이 프로퍼티 에디터에서는, 지정된 객체를 편집하기 위해서 java.beans.PropertyEditor 인터페이스를 지원할 필요가 있습니다.
PropertyEditorManager 는, 지정된 형태의 에디터를 찾아내기 위해서(때문에) 3 개의 테크닉을 사용합니다. 우선, 지정된 형태로 에디터를 구체적으로 등록할 수 있도록(듯이) 하는 registerEditor 메소드를 제공합니다. 다음에, 지정된 형태의 완전 지정 클래스명에 "Editor" 를 추가해 (예를 들어 "foo.bah.FozEditor"), 적절한 클래스를 찾아내려고 합니다. 마지막으로, 단순한 클래스명 (패키지명 없음)에 "Editor" 를 추가해, 일치하는 클래스를 패키지의 검색 패스로 찾아냅니다.
예를 들어 입력 클래스 foo.bah.Fred 이면, 최초로 PropertyEditorManager 의 테이블로, 에디터가 foo.bah.Fred 로 등록되어 있는지 어떤지를 조사해 등록되어 있는 경우는 그 에디터를 사용합니다. 다음에 foo.bah.FredEditor 클래스를 찾습니다. 마지막에 standardEditorsPackage.FredEditor 클래스를 찾습니다.
디폴트의 PropertyEditor 는, Java 원시형 boolean, byte, short, int, long, float, 및 double 로 준비되어 있습니다. 또, java.lang.String, java.awt.Color, 및 java.awt.Font 의 각 클래스에 대해서도 준비되어 있습니다.
생성자 의 개요 | |
---|---|
PropertyEditorManager ()
|
메소드의 개요 | |
---|---|
static PropertyEditor |
findEditor (Class <? > targetType)
지정된 타겟형의 값에디터를 찾아냅니다. |
static String [] |
getEditorSearchPath ()
프로퍼티 에디터를 검색하기 위한 패키지명을 가져옵니다. |
static void |
registerEditor (Class <? > targetType,
Class <? > editorClass)
지정된 타겟 클래스의 값을 편집하기 위해서 사용되는 에디터 클래스를 등록합니다. |
static void |
setEditorSearchPath (String [] path)
프로퍼티 에디터의 검색에 사용되는 패키지명의 리스트를 변경합니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public PropertyEditorManager()
메소드의 상세 |
---|
public static void registerEditor(Class <? > targetType, Class <? > editorClass)
시큐리티 매니저가 존재하는 경우, 최초로, 그 checkPropertiesAccess
메소드가 불려 갑니다. 이 결과, SecurityException 가 throw 되는 일이 있습니다.
targetType
- 편집하는 형태의 Class 객체editorClass
- 에디터 클래스의 Class 객체. null 의 경우, 기존의 정의가 모두 삭제된다
SecurityException
- 시큐리티 매니저가 존재해,
그 checkPropertiesAccess
메소드가,
시스템 프로퍼티의 설정을 허가하지 않는 경우SecurityManager.checkPropertiesAccess()
public static PropertyEditor findEditor(Class <? > targetType)
targetType
- 편집하는 형태의 Class 객체
public static String [] getEditorSearchPath()
이 배열의 디폴트 값는 구현에 의존해, 예를 들어 Sun 의 구현에서의 초기설정은 {"sun.beans.editors"}.
public static void setEditorSearchPath(String [] path)
시큐리티 매니저가 존재하는 경우, 최초로, 그 checkPropertiesAccess
메소드가 불려 갑니다. 이 결과, SecurityException 가 throw 되는 일이 있습니다.
path
- 패키지명의 배열
SecurityException
- 시큐리티 매니저가 존재해,
그 checkPropertiesAccess
메소드가,
시스템 프로퍼티의 설정을 허가하지 않는 경우SecurityManager.checkPropertiesAccess()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.