|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjava.text.AttributedString
public class AttributedString
텍스트와 그 텍스트에 관련하는 속성 정보를 보관 유지합니다. 텍스트를 읽어내는 사용자가, AttributedCharacterIterator 인터페이스 경유로 속성 첨부 텍스트에 액세스 할 필요가 있는 경우, 이 클래스를 실제의 데이터 스토리지로서 사용할 수 있습니다.
속성은 키와 값의 페어이며, 키로 식별됩니다. 1 개의 문자에 대해서 복수의 속성 키를 정의할 수 없습니다.
속성의 값은 불변입니다. 즉, 클라이언트나 스토리지에 의해 변경할 수 없습니다. 속성의 값은 항상 참조 인도입니다. 복제될 것은 없습니다.
AttributedCharacterIterator
,
Annotation
생성자 의 개요 | |
---|---|
AttributedString (AttributedCharacterIterator text)
지정된 AttributedCharacterIterator 가 표현하는 속성 첨부 텍스트를 가지는, AttributedString 인스턴스를 구축합니다. |
|
AttributedString (AttributedCharacterIterator text,
int beginIndex,
int endIndex)
지정된 AttributedCharacterIterator 가 표현하는 속성 첨부 텍스트의 부분 범위를 가지는 AttributedString 인스턴스를 구축합니다. |
|
AttributedString (AttributedCharacterIterator text,
int beginIndex,
int endIndex,
AttributedCharacterIterator.Attribute [] attributes)
지정된 AttributedCharacterIterator 가 표현하는 속성 첨부 텍스트의 부분 범위를 가지는 AttributedString 인스턴스를 구축합니다. |
|
AttributedString (String text)
지정된 텍스트를 가지는 AttributedString 인스턴스를 구축합니다. |
|
AttributedString (String text,
Map <? extends AttributedCharacterIterator.Attribute ,? > attributes)
지정된 텍스트와 속성을 가지는 AttributedString 인스턴스를 구축합니다. |
메소드의 개요 | |
---|---|
void |
addAttribute (AttributedCharacterIterator.Attribute attribute,
Object value)
속성을 캐릭터 라인 전체에 추가합니다. |
void |
addAttribute (AttributedCharacterIterator.Attribute attribute,
Object value,
int beginIndex,
int endIndex)
속성을 캐릭터 라인의 부분 범위에 추가합니다. |
void |
addAttributes (Map <? extends AttributedCharacterIterator.Attribute ,? > attributes,
int beginIndex,
int endIndex)
일련의 속성을 캐릭터 라인의 부분 범위에 추가합니다. |
AttributedCharacterIterator |
getIterator ()
이 캐릭터 라인의 내용 전체에 액세스 할 수 있는 AttributedCharacterIterator 인스턴스를 작성합니다. |
AttributedCharacterIterator |
getIterator (AttributedCharacterIterator.Attribute [] attributes)
이 캐릭터 라인의 선택된 내용에 액세스 할 수 있는 AttributedCharacterIterator 인스턴스를 작성합니다. |
AttributedCharacterIterator |
getIterator (AttributedCharacterIterator.Attribute [] attributes,
int beginIndex,
int endIndex)
이 캐릭터 라인의 선택된 내용에 액세스 할 수 있는 AttributedCharacterIterator 인스턴스를 작성합니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public AttributedString(String text)
text
- 이 속성 첨부 캐릭터 라인의 텍스트
NullPointerException
- text
가 null 의 경우public AttributedString(String text, Map <? extends AttributedCharacterIterator.Attribute ,? > attributes)
text
- 이 속성 첨부 캐릭터 라인의 텍스트attributes
- 캐릭터 라인 전체에 적용하는 속성
NullPointerException
- text
또는
attributes
가 null 의 경우
IllegalArgumentException
- 텍스트장이 0 으로,
한편 속성 파라미터가 빈 상태(empty)의 Map 가 아닌 경우
(길이 0 의 범위에는 속성을 적용할 수 없다)public AttributedString(AttributedCharacterIterator text)
text
- 이 속성 첨부 캐릭터 라인의 텍스트
NullPointerException
- text
가 null 의 경우public AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex)
text
- 이 속성 첨부 캐릭터 라인의 텍스트beginIndex
- 범위의 선두 문자의 인덱스endIndex
- 범위의 말미 문자의 다음의 문자의
인덱스
NullPointerException
- text
가 null 의 경우
IllegalArgumentException
- beginIndex 와 endIndex 로 지정된 부분 범위가
텍스트의 범위외에 있는 경우Annotation
public AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, AttributedCharacterIterator.Attribute [] attributes)
text
- 이 속성 첨부 캐릭터 라인의 텍스트beginIndex
- 범위의 선두 문자의 인덱스endIndex
- 범위의 말미 문자의 다음의 문자의
인덱스attributes
- 텍스트로부터 추출한다
속성. null 가 지정되었을 경우, 이용 가능한 모든 속성이
사용된다
NullPointerException
- text
또는
attributes
가 null 의 경우
IllegalArgumentException
- beginIndex 와 endIndex 로 지정된 부분 범위가
텍스트의 범위외에 있는 경우Annotation
메소드의 상세 |
---|
public void addAttribute(AttributedCharacterIterator.Attribute attribute, Object value)
attribute
- 속성 키value
- 속성의 값. null 도 지정 가능
NullPointerException
- attribute
가 null 의 경우
IllegalArgumentException
- AttributedString 의 길이가 0 의 경우
(길이 0 의 범위에는 속성을 적용할 수 없다)public void addAttribute(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex)
attribute
- 속성 키value
- 속성의 값null 의 경우 있어beginIndex
- 범위의 선두 문자의 인덱스endIndex
- 범위의 말미 문자의 다음의 문자의 인덱스
NullPointerException
- attribute
가 null 의 경우
IllegalArgumentException
- beginIndex 가 0 보다 작은 경우,
endIndex 가 캐릭터 라인장보다 큰 경우, 혹은 beginIndex 와 endIndex 로 정의된다
캐릭터 라인의 부분 범위가 비우는 경우public void addAttributes(Map <? extends AttributedCharacterIterator.Attribute ,? > attributes, int beginIndex, int endIndex)
attributes
- 캐릭터 라인에 추가하는 속성beginIndex
- 범위의 선두 문자의 인덱스endIndex
- 범위의 말미 문자의
다음의 문자의 인덱스
NullPointerException
- attributes
가 null 의 경우
IllegalArgumentException
- beginIndex 가 0 보다 작은 경우,
endIndex 가 캐릭터 라인장보다 큰 경우,
혹은 beginIndex 와 endIndex 로 정의된다
캐릭터 라인의 부분 범위가 빈 상태(empty)에서, 속성 파라미터는
빈 상태(empty)의 Map 가 아닌 경우public AttributedCharacterIterator getIterator()
public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute [] attributes)
attributes
- 클라이언트가 흥미를 가지고 있는 속성의 리스트
public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute [] attributes, int beginIndex, int endIndex)
attributes
- 클라이언트가 흥미를 가지고 있는 속성의 리스트beginIndex
- 최초의 문자의 인덱스endIndex
- 마지막 문자의 뒤에 계속되는 문자의 인덱스
IllegalArgumentException
- beginIndex 가 0 보다 작은 경우,
endIndex 가 캐릭터 라인장보다 큰 경우,
혹은 beginIndex 가 endIndex 보다 큰 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.