|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.text.DocumentFilter.FilterBypass
public abstract static class DocumentFilter.FilterBypass
Document 에의 콜백을 회피해, Document 를 변경하는 경우에 사용됩니다. DocumentFilter 를 지원하는 Document 구현에서는, 이하의 메소드가 DocumentFilter 로부터 불려 갔을 때에, DocumentFilter 에의 콜백을 실행하지 않게 할 필요가 있습니다.
생성자 의 개요 | |
---|---|
DocumentFilter.FilterBypass ()
|
메소드의 개요 | |
---|---|
abstract Document |
getDocument ()
변경을 하고 있는 Document 를 돌려줍니다. |
abstract void |
insertString (int offset,
String string,
AttributeSet attr)
DocumentFilter 를 우회도로 해, 지정 텍스트를 삽입합니다. |
abstract void |
remove (int offset,
int length)
DocumentFilter 를 우회도로 해, 텍스트의 지정 영역을 삭제합니다. |
abstract void |
replace (int offset,
int length,
String string,
AttributeSet attrs)
offset 로부터 offset + length 까지의 텍스트 영역을 삭제해,text 에 옮겨놓습니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public DocumentFilter.FilterBypass()
메소드의 상세 |
---|
public abstract Document getDocument()
public abstract void remove(int offset, int length) throws BadLocationException
offset
- 선두로부터의 오프셋(offset) >= 0length
- 삭제 대상의 문자수 >= 0
BadLocationException
- 삭제 범위의 일부가 문서의 유효한 부분이 아니었던 경우.
예외내의 위치는,
최초로 검출된 부정한 위치public abstract void insertString(int offset, String string, AttributeSet attr) throws BadLocationException
offset
- 컨텐츠를 삽입하는 문서내의 오프셋(offset). 0 이상.
지정 위치나 그 뒤의 변경을 추적한다
모든 위치가 이동string
- 삽입하는 캐릭터 라인attr
- 삽입된 컨텐츠에 관련짓는 속성.
속성이 없는 경우는 null 도 가능
BadLocationException
- 지정된 삽입 위치가
문서내의 유효한 위치가 아닌 경우public abstract void replace(int offset, int length, String string, AttributeSet attrs) throws BadLocationException
offset
로부터 offset + length
까지의 텍스트 영역을 삭제해,text
에 옮겨놓습니다.
offset
- Document 에서의 위치length
- 삭제하는 텍스트의 길이string
- 삽입하는 텍스트. null 의 경우, 텍스트는 삽입되지 않는attrs
- 삽입된 텍스트의 속성을 나타내는 AttributeSet.
null 도 가능
BadLocationException
- 지정된 삽입 위치가
문서내의 유효한 위치가 아닌 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.