|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
public static interface AbstractDocument.Content
편집 가능한 문자의 순서를 나타내는 인터페이스입니다. 구현에서는, 변경이 UndoableEdit 의 구현을 돌려줄지 어떨지를 반영하는, 이력 기구를 지원해도 하지 않아도 괜찮습니다.
AbstractDocument
메소드의 개요 | |
---|---|
Position |
createPosition (int offset)
컨텐츠가 변경되었을 때에 변경을 추적하는 컨텐츠내의 위치를 작성합니다. |
void |
getChars (int where,
int len,
Segment txt)
문자의 순서를 취득해, 세그먼트(segment)에 카피합니다. |
String |
getString (int where,
int len)
순서에 포함되는 캐릭터 라인을 돌려줍니다. |
UndoableEdit |
insertString (int where,
String str)
순서에 캐릭터 라인을 삽입합니다. |
int |
length ()
문자 순서의, 현재의 길이입니다. |
UndoableEdit |
remove (int where,
int nitems)
순서의 일부를 삭제합니다. |
메소드의 상세 |
---|
Position createPosition(int offset) throws BadLocationException
offset
- 컨텐츠의 오프셋(offset) >= 0
BadLocationException
- 오프셋(offset)가 무효인 경우int length()
UndoableEdit insertString(int where, String str) throws BadLocationException
where
- 삽입하는 순서까지의 오프셋(offset) >= 0str
- 삽입하는 캐릭터 라인
Edit
의 구현에의 참조가 반환된다.
그렇지 않은 경우는 null
BadLocationException
- 인수에 의해 지정된 영역이 문자의 순서에
포함되지 않는 경우에 throw 된다UndoableEdit remove(int where, int nitems) throws BadLocationException
where
- 삽입하는 순서까지의
오프셋(offset) >= 0nitems
- 삭제 대상이 되는 순서내의 항목의 수 >= 0
BadLocationException
- 인수에 의해 지정된 영역이 문자의 순서에
포함되지 않는 경우에 throw 된다String getString(int where, int len) throws BadLocationException
where
- 취득하는 순서까지의 오프셋(offset) >= 0len
- 카피하는 문자수 >= 0
BadLocationException
- 인수에 의해 지정된 영역이 문자의 순서에
포함되지 않는 경우에 throw 된다void getChars(int where, int len, Segment txt) throws BadLocationException
where
- 개시 오프셋(offset) >= 0len
- 문자수 >= 0txt
- 카피처의 위치
BadLocationException
- 인수에 의해 지정된 영역이 문자의 순서에
포함되지 않는 경우에 throw 된다
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.