JavaTM 2 Platform
Standard Ed. 5.0

java.text
Ŭ·¡½º AttributedString

java.lang.Object 
  »óÀ§¸¦ È®Àå java.text.AttributedString

public class AttributedString
extends Object

ÅؽºÆ®¿Í ±× ÅؽºÆ®¿¡ °ü·ÃµÈ ¼Ó¼º Á¤º¸¸¦ º¸°ü À¯ÁöÇÕ´Ï´Ù. ÅؽºÆ®¸¦ Àо´Â »ç¿ëÀÚ°¡ AttributedCharacterIterator ÀÎÅÍÆäÀ̽º °æÀ¯·Î ¼Ó¼º ÷ºÎ ÅؽºÆ®¿¡ ¾×¼¼½º ÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì, ÀÌ Å¬·¡½º¸¦ ½ÇÁ¦ÀÇ µ¥ÀÌÅÍ ½ºÅ丮Áö·Î¼­ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

µµÀÔµÈ ¹öÀü :
1.2
°ü·Ã Ç׸ñ:
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)
          ¼Ó¼ºÀ» ij¸¯ÅÍ ¶óÀÎ Àüü¿¡ Ãß°¡ÇÕ´Ï´Ù.
 void addAttribute (AttributedCharacterIterator.Attribute  attribute, Object  value, int beginIndex, int endIndex)
          ¼Ó¼ºÀ» ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§¿¡ Ãß°¡ÇÕ´Ï´Ù.
 void addAttributes (Map <? extends AttributedCharacterIterator.Attribute, ? > attributes, int beginIndex, int endIndex)
          ÀÏ·ÃÀÇ ¼Ó¼ºÀ» ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§¿¡ Ãß°¡ÇÕ´Ï´Ù.
 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
 

»ý¼ºÀÚ »ó¼¼

AttributedString

public AttributedString(String  text)
ÁöÁ¤µÈ ÅؽºÆ®¸¦ °¡Áö´Â AttributedString ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
text - ÀÌ ¼Ó¼º ÷ºÎ ij¸¯ÅÍ ¶óÀÎÀÇ ÅؽºÆ®

AttributedString

public AttributedString(String  text,
                        Map <?  extends AttributedCharacterIterator.Attribute,
? > attributes)
ÁöÁ¤µÈ ÅؽºÆ®¿Í ¼Ó¼ºÀ» °¡Áö´Â AttributedString ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
text - ÀÌ ¼Ó¼º ÷ºÎ ij¸¯ÅÍ ¶óÀÎÀÇ ÅؽºÆ®
attributes - ij¸¯ÅÍ ¶óÀÎ Àüü¿¡ Àû¿ëÇÏ´Â ¼Ó¼º
¿¹¿Ü:
IllegalArgumentException - ÅؽºÆ®ÀåÀÌ 0 À¸·Î ÇÑÆí ¼Ó¼º ÆĶó¹ÌÅÍ°¡ ºñ¾îÀÖ´Â MapÀÌ ¾Æ´Ñ °æ¿ì (±æÀÌ 0 ¹üÀ§¿¡´Â ¼Ó¼ºÀ» Àû¿ëÇÒ ¼ö ¾ø´Ù)

AttributedString

public AttributedString(AttributedCharacterIterator  text)
ÁöÁ¤µÈ AttributedCharacterIterator°¡ Ç¥ÇöÇÏ´Â ¼Ó¼º ÷ºÎ ÅؽºÆ®¸¦ °¡Áö´Â AttributedString ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
text - ÀÌ ¼Ó¼º ÷ºÎ ij¸¯ÅÍ ¶óÀÎÀÇ ÅؽºÆ®

AttributedString

public AttributedString(AttributedCharacterIterator  text,
                        int beginIndex,
                        int endIndex)
ÁöÁ¤µÈ AttributedCharacterIterator°¡ Ç¥ÇöÇÏ´Â ¼Ó¼º ÷ºÎ ÅؽºÆ®ÀÇ ºÎºÐ ¹üÀ§¸¦ °¡Áö´Â AttributedString ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù. ÁöÁ¤µÈ ¹üÀ§°¡ ºñ¾îÀÖ´Â ÅؽºÆ®¸¦ »ý¼ºÇÏ´Â °æ¿ì, ¸ðµç ¼Ó¼ºÀÌ ÆıâµË´Ï´Ù. ¿øÀÇ ¼Ó¼º ¹üÀ§ÀÇ ºÎºÐ ¹üÀ§¿¡ ´ëÇؼ­´Â Annotation °´Ã¼¿¡ ÀÇÇØ ·¦ µÈ ¼Ó¼ºÀº ¸ðµÎ ÆıâµË´Ï´Ù.

ÆĶó¹ÌÅÍ:
text - ÀÌ ¼Ó¼º ÷ºÎ ij¸¯ÅÍ ¶óÀÎÀÇ ÅؽºÆ®
beginIndex - ¹üÀ§ÀÇ ¼±µÎ ¹®ÀÚÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ¸»¹Ì ¹®ÀÚÀÇ ´ÙÀ½ÀÇ ¹®ÀÚÀÇ À妽º
¿¹¿Ü:
IllegalArgumentException - beginIndex¿Í endIndex ·Î ÁöÁ¤µÈ ºÎºÐ ¹üÀ§°¡ ÅؽºÆ®ÀÇ ¹üÀ§¿Ü¿¡ ÀÖ´Â °æ¿ì
°ü·Ã Ç׸ñ:
Annotation

AttributedString

public AttributedString(AttributedCharacterIterator  text,
                        int beginIndex,
                        int endIndex,
                        AttributedCharacterIterator.Attribute [] attributes)
ÁöÁ¤µÈ AttributedCharacterIterator°¡ Ç¥ÇöÇÏ´Â ¼Ó¼º ÷ºÎ ÅؽºÆ®ÀÇ ºÎºÐ ¹üÀ§¸¦ °¡Áö´Â AttributedString ÀνºÅϽº¸¦ ±¸ÃàÇÕ´Ï´Ù. ÁöÁ¤µÈ ¼Ó¼º¿¡ ÀÏÄ¡ÇÏ´Â ¼Ó¼º¸¸ÀÌ ÀνºÅϽº¿¡ Â¥³Ö¾îÁý´Ï´Ù. ÁöÁ¤µÈ ¹üÀ§°¡ ºñ¾îÀÖ´Â ÅؽºÆ®¸¦ »ý¼ºÇÏ´Â °æ¿ì, ¸ðµç ¼Ó¼ºÀÌ ÆıâµË´Ï´Ù. ¿øÀÇ ¼Ó¼º ¹üÀ§ÀÇ ºÎºÐ ¹üÀ§¿¡ ´ëÇؼ­´Â Annotation °´Ã¼¿¡ ÀÇÇØ ·¦ µÈ ¼Ó¼ºÀº ¸ðµÎ ÆıâµË´Ï´Ù.

ÆĶó¹ÌÅÍ:
text - ÀÌ ¼Ó¼º ÷ºÎ ij¸¯ÅÍ ¶óÀÎÀÇ ÅؽºÆ®
beginIndex - ¹üÀ§ÀÇ ¼±µÎ ¹®ÀÚÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ¸»¹Ì ¹®ÀÚÀÇ ´ÙÀ½ÀÇ ¹®ÀÚÀÇ À妽º
attributes - ÅؽºÆ®·ÎºÎÅÍ ÃßÃâÇÏ´Â ¼Ó¼º. nullÀÌ ÁöÁ¤µÇ¾úÀ» °æ¿ì, ÀÌ¿ë °¡´ÉÇÑ ¸ðµç ¼Ó¼ºÀÌ »ç¿ëµÈ´Ù
¿¹¿Ü:
IllegalArgumentException - beginIndex¿Í endIndex ·Î ÁöÁ¤µÈ ºÎºÐ ¹üÀ§°¡ ÅؽºÆ®ÀÇ ¹üÀ§¿Ü¿¡ ÀÖ´Â °æ¿ì
°ü·Ã Ç׸ñ:
Annotation
¸Þ¼­µåÀÇ »ó¼¼

addAttribute

public void addAttribute(AttributedCharacterIterator.Attribute  attribute,
                         Object  value)
¼Ó¼ºÀ» ij¸¯ÅÍ ¶óÀÎ Àüü¿¡ Ãß°¡ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
attribute - ¼Ó¼ºÀÇ Å°
value - ¼Ó¼ºÀÇ °ª. nullµµ ÁöÁ¤ °¡´É
¿¹¿Ü:
IllegalArgumentException - AttributedString ±æÀÌ°¡ 0ÀÎ °æ¿ì (±æÀÌ 0 ¹üÀ§¿¡´Â ¼Ó¼ºÀ» Àû¿ëÇÒ ¼ö ¾ø´Ù)

addAttribute

public void addAttribute(AttributedCharacterIterator.Attribute  attribute,
                         Object  value,
                         int beginIndex,
                         int endIndex)
¼Ó¼ºÀ» ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§¿¡ Ãß°¡ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
attribute - ¼Ó¼ºÀÇ Å°
value - ¼Ó¼ºÀÇ °ª. nullµµ ÁöÁ¤ °¡´É
beginIndex - ¹üÀ§ÀÇ ¼±µÎ ¹®ÀÚÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ¸»¹Ì ¹®ÀÚÀÇ ´ÙÀ½ÀÇ ¹®ÀÚÀÇ À妽º
¿¹¿Ü:
IllegalArgumentException - beginIndex°¡ 0 º¸´Ù ÀÛÀº °æ¿ì, endIndex°¡ ij¸¯ÅÍ ¶óÀÎ ±æÀ̺¸´Ù Å« °æ¿ì, ȤÀº beginIndex¿Í endIndex ·Î Á¤ÀǵǴ ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§°¡ ºñ¿ì´Â °æ¿ì

addAttributes

public void addAttributes(Map <?  extends AttributedCharacterIterator.Attribute,
? > attributes,
                          int beginIndex,
                          int endIndex)
ÀÏ·ÃÀÇ ¼Ó¼ºÀ» ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§¿¡ Ãß°¡ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
attributes - ij¸¯ÅÍ ¶óÀο¡ Ãß°¡ÇÏ´Â ¼Ó¼º
beginIndex - ¹üÀ§ÀÇ ¼±µÎ ¹®ÀÚÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ¸»¹Ì ¹®ÀÚÀÇ ´ÙÀ½ÀÇ ¹®ÀÚÀÇ À妽º
¿¹¿Ü:
IllegalArgumentException - beginIndex°¡ 0 º¸´Ù ÀÛÀº °æ¿ì, endIndex°¡ ij¸¯ÅÍ ¶óÀÎ ±æÀ̺¸´Ù Å« °æ¿ì, ȤÀº beginIndex¿Í endIndex ·Î Á¤ÀǵǴ ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§°¡ ºñ¾îÀִµ¥ ¼Ó¼º ÆĶó¹ÌÅÍ´Â ºñ¾îÀÖ´Â MapÀÌ ¾Æ´Ñ °æ¿ì

getIterator

public AttributedCharacterIterator  getIterator()
ÀÌ Ä³¸¯ÅÍ ¶óÀÎÀÇ ³»¿ë Àüü¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â AttributedCharacterIterator ÀνºÅϽº¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÅؽºÆ®¿Í ±× ¼Ó¼º¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â ¹Ýº¹ÀÚ

getIterator

public AttributedCharacterIterator  getIterator(AttributedCharacterIterator.Attribute [] attributes)
ÀÌ Ä³¸¯ÅÍ ¶óÀÎÀÇ ¼±ÅÃµÈ ³»¿ë¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â AttributedCharacterIterator ÀνºÅϽº¸¦ ÀÛ¼ºÇÕ´Ï´Ù. attributes¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº ¼Ó¼ºÀÇ Á¤º¸¸¦ ±¸ÇöÀÚ°¡ º¸°ü À¯ÁöÇÏ´Â °æ¿ì, ±×·¯ÇÑ Á¤º¸¸¦ ÀÌ ¹Ýº¹ÀÚ °æÀ¯·Î ¾×¼¼½º °¡´ÉÇÏ°Ô ÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù. ¸®½ºÆ®°¡ nullÀÎ °æ¿ì, ÀÌ¿ë °¡´ÉÇÑ ¸ðµç ¼Ó¼ºÀÇ Á¤º¸¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖÀ» ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
attributes - Ŭ¶óÀ̾ðÆ®°¡ Èï¹Ì¸¦ °¡Áö°í ÀÖ´Â ¼Ó¼ºÀÇ ¸®½ºÆ®
¹Ýȯ°ª:
ÅؽºÆ® ¹× ÅؽºÆ®ÀÇ ¼Ó¼º¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â ¹Ýº¹ÀÚ

getIterator

public AttributedCharacterIterator  getIterator(AttributedCharacterIterator.Attribute [] attributes,
                                               int beginIndex,
                                               int endIndex)
ÀÌ Ä³¸¯ÅÍ ¶óÀÎÀÇ ¼±ÅÃµÈ ³»¿ë¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â AttributedCharacterIterator ÀνºÅϽº¸¦ ÀÛ¼ºÇÕ´Ï´Ù. attributes¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº ¼Ó¼ºÀÇ Á¤º¸¸¦ ±¸ÇöÀÚ°¡ º¸°ü À¯ÁöÇÏ´Â °æ¿ì, ±×·¯ÇÑ Á¤º¸¸¦ ÀÌ ¹Ýº¹ÀÚ °æÀ¯·Î ¾×¼¼½º °¡´ÉÇÏ°Ô ÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù. ¸®½ºÆ®°¡ nullÀÎ °æ¿ì, ÀÌ¿ë °¡´ÉÇÑ ¸ðµç ¼Ó¼ºÀÇ Á¤º¸¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖÀ» ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
attributes - Ŭ¶óÀ̾ðÆ®°¡ Èï¹Ì¸¦ °¡Áö°í ÀÖ´Â ¼Ó¼ºÀÇ ¸®½ºÆ®
beginIndex - ¼±µÎ ¹®ÀÚÀÇ À妽º
endIndex - ¸»¹Ì ¹®ÀÚÀÇ ´ÙÀ½ÀÇ ¹®ÀÚÀÇ À妽º
¹Ýȯ°ª:
ÅؽºÆ® ¹× ÅؽºÆ®ÀÇ ¼Ó¼º¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â ¹Ýº¹ÀÚ
¿¹¿Ü:
IllegalArgumentException - beginIndex°¡ 0 º¸´Ù ÀÛÀº °æ¿ì, endIndex°¡ ij¸¯ÅÍ ¶óÀÎ ±æÀ̺¸´Ù Å« °æ¿ì, ȤÀº beginIndex°¡ endIndex º¸´Ù Å« °æ¿ì

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.