|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
public class PlainDocument
문자의 속성을 전혀 보관 유지하지 않는 프레인인 문서입니다. 디폴트에서는, 이 문서의 요소의 구조는, 텍스트내의 행을 맵 한 것이 됩니다. getDefaultRootElement 메소드가 돌려주는 Element 하행의 맵을 나타내, 각 자 요소는 단일의 행을 나타냅니다. 이 모델은 문자 레벨의 속성을 전혀 가지지 않습니다만, 각각의 행에는 임의의 속성 세트에 의한 태그를 붙일 수가 있습니다. 행으로부터 오프셋(offset), 및 오프셋(offset)로부터 행에의 변환은 디폴트의 루트 요소를 사용해 신속히 실행됩니다. 편집에 의해 트리거되는 DocumentEvent 의 구조에 대한 정보는, 행의 구조의 변경을 나타냅니다.
디폴트의 컨텐츠 기억역관리는, 갭 첨부 버퍼의 구현 (GapContent)에 의해 행해집니다. GapContent 는, 꽤 큰 문서의 편집을 지원하고 있어, 인접하는 결정된 영역에 대한 일반적인 편집을 효율적으로 처리할 수 있습니다.
경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans™ 의 장기간의 운용 지원는,java.beans
패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder
를 참조해 주세요.
Document
,
AbstractDocument
상자의 클래스의 개요 |
---|
클래스 javax.swing.text. AbstractDocument 로부터 상속된 상자의 클래스/인터페이스 |
---|
AbstractDocument.AbstractElement , AbstractDocument.AttributeContext , AbstractDocument.BranchElement , AbstractDocument.Content , AbstractDocument.DefaultDocumentEvent , AbstractDocument.ElementEdit , AbstractDocument.LeafElement |
필드의 개요 | |
---|---|
static String |
lineLimitAttribute
최대 길이이 있는 경우, 1 행의 최대 길이을 지정하는 속성의 이름입니다. |
static String |
tabSizeAttribute
컨텐츠내의 탭의 사이즈를 지정하는 속성의 이름입니다. |
클래스 javax.swing.text. AbstractDocument 로부터 상속된 필드 |
---|
BAD_LOCATION , BidiElementName , ContentElementName , ElementNameAttribute , listenerList , ParagraphElementName , SectionElementName |
인터페이스 javax.swing.text. Document 로부터 상속된 필드 |
---|
StreamDescriptionProperty , TitleProperty |
생성자 의 개요 | |
---|---|
PlainDocument ()
plaintext 문서를 구축합니다. |
|
PlainDocument (AbstractDocument.Content c)
plaintext 문서를 구축합니다. |
메소드의 개요 | |
---|---|
protected AbstractDocument.AbstractElement |
createDefaultRoot ()
디폴트의 문서 구조를 나타내기 위해서(때문에) 사용하는 루트 요소를 작성합니다. |
Element |
getDefaultRootElement ()
문서 모델의 디폴트의 루트 요소를 가져옵니다. |
Element |
getParagraphElement (int pos)
지정된 위치를 보관 유지하는 단락 요소를 가져옵니다. |
void |
insertString (int offs,
String str,
AttributeSet a)
문서에 내용을 삽입합니다. |
protected void |
insertUpdate (AbstractDocument.DefaultDocumentEvent chng,
AttributeSet attr)
문서 구조를 텍스트 삽입의 결과로 갱신합니다. |
protected void |
removeUpdate (AbstractDocument.DefaultDocumentEvent chng)
문서 구조를 텍스트 삭제의 결과로 갱신합니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
public static final String tabSizeAttribute
public static final String lineLimitAttribute
생성자 의 상세 |
---|
public PlainDocument()
public PlainDocument(AbstractDocument.Content c)
c
- 컨텐츠의 컨테이너메소드의 상세 |
---|
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
이 메소드는 thread에 대해서 안전합니다만, 대부분의 Swing 메소드는 다릅니다. 자세한 것은,「How to Use Threads」를 참조해 주세요.
Document
내의 insertString
AbstractDocument
내의 insertString
offs
- 개시 오프셋(offset) <= 0str
- 삽입하는 캐릭터 라인. null 나 빈 상태(empty)의 캐릭터 라인의 경우는 아무것도 하지 않는a
- 삽입된 컨텐츠의 속성
BadLocationException
- 지정된 삽입 위치가
문서내의 유효한 위치가 아닌 경우Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
public Element getDefaultRootElement()
Document
내의 getDefaultRootElement
AbstractDocument
내의 getDefaultRootElement
Document.getDefaultRootElement()
protected AbstractDocument.AbstractElement createDefaultRoot()
public Element getParagraphElement(int pos)
AbstractDocument
내의 getParagraphElement
pos
- 개시 오프셋(offset) >= 0
protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
AbstractDocument
내의 insertUpdate
chng
- 편집을 기술하는 변경 이벤트attr
- 삽입 텍스트의 속성 세트protected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng)
AbstractDocument
내의 removeUpdate
chng
- 편집을 기술하는 변경 이벤트
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.