|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 모든 클래스 | ||||||||||
개요: 상자 | 필드 | constructor | 메소드 | 상세: 필드 | constructor | 메소드 |
java.lang.Object | +--javax.swing.text.DocumentFilter
DocumentFilter
는 이름이 가리키도록(듯이) Document
변경 메소드의 필터입니다. DocumentFilter
를 저장하는 Document
가,insert
또는 remove
를 개입시켜 변경되면(자), 적당한 메소드 호출이 DocumentFilter
에 전송 됩니다. 디폴트의 구현에서는 변경이 가능합니다. 서브 클래스는 경우에 응해 메소드를 슈퍼 클래스상에 호출하는지 건네받은 FilterBypass
에 필요한 메소드를 호출하는 것으로, 변경에 필터를 설정할 수 있습니다. 서브 클래스는 변경을 Document 에 콜백 하는 것이 아니라, 슈퍼 클래스나 FilterBypass
에의 호출을 실시할 필요가 있습니다.
remove
또는 insertString
가 DocumentFilter
상에서 불려 가면(자),DocumentFilter
는 FilterBypass
를 여러 차례 또는 다른 area에 대해서 콜백 할 수 있습니다만,remove
또는 insertString
메소드로부터 돌려주어진 후에,FilterBypass
에 콜백 해 되지 않습니다.
Document
중첩된 클래스의 개요 | |
static class |
DocumentFilter.FilterBypass
Document 에의 콜백을 회피해, Document 를 변경하는 경우에 사용됩니다. |
생성자의 개요 | |
DocumentFilter ()
|
메소드의 개요 | |
void |
insertString (DocumentFilter.FilterBypass fb,
int offset,
String string,
AttributeSet attr)
지정한 Document 에 텍스트를 삽입하기 전에 불려 갑니다. |
void |
remove (DocumentFilter.FilterBypass fb,
int offset,
int length)
지정한 Document 의 지정한 범위를 삭제하기 전에 불려 갑니다. |
void |
replace (DocumentFilter.FilterBypass fb,
int offset,
int length,
String text,
AttributeSet attrs)
지정한 Document 로 텍스트의 범위를 옮겨놓기 전에 불려 갑니다. |
클래스 java.lang. Object 에서 상속받은 메소드 |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자의 상세 |
public DocumentFilter()
메소드의 상세 |
public void remove(DocumentFilter.FilterBypass fb, int offset, int length) throws BadLocationException
FilterBypass
를 필요에 따라서 직접 호출합니다.
fb
- Document 의 변경에 사용하는 FilterBypassoffset
- 선두로부터의 오프셋(offset) >= 0length
- 삭제 대상의 캐릭터수 >= 0
BadLocationException
- 삭제 범위의 일부가 문서의 유효 부분이 아니었던 경우. 예외내의 위치는 최초로 검출된 부정한 위치public void insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr) throws BadLocationException
fb
- Document 의 변경에 사용하는 FilterBypassoffset
- 컨텐츠를 삽입하는 문서에 대한 오프셋(offset) >= 0. 지정 위치나 그 후의 변경을 추적하는 모든 위치가 이동string
- 삽입하는 캐릭터 라인attr
- 삽입된 컨텐츠에 관련하고 있는 속성. 속성이 없는 경우는 null
BadLocationException
- 지정된 삽입의 위치가, 문서내의 유효한 위치가 아닌 경우public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException
fb
- Document 의 변경에 사용하는 FilterBypassoffset
- Document 에서의 위치length
- 삭제하는 텍스트의 길이text
- 삽입하는 텍스트. null 의 경우, 텍스트는 삽입되지 않는attrs
- 삽입된 텍스트의 속성을 나타내는 AttributeSet. null 도 가능
BadLocationException
- 지정된 삽입의 위치가, 문서내의 유효한 위치가 아닌 경우
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 모든 클래스 | ||||||||||
개요: 상자 | 필드 | constructor | 메소드 | 상세: 필드 | constructor | 메소드 |
Java, Java 2 D, 및 JDBC 는 미국 및 그 외의 나라에 있어서의 미국 Sun Microsystems, Inc. 의 상표 혹은 등록상표입니다.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.