JavaTM 2
Platform
Std.  Ed.  v1. 4.0

java.text
Ŭ·¡½º AttributedString

java.lang.Object 
  |
  +--java.text.AttributedString

public class AttributedString
extends Object

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

°ü·Ã Ç׸ñ:
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  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  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  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 - ¹üÀ§ÀÇ ¼±µÎ ij¸¯ÅÍÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ÃÖÁ¾ ij¸¯ÅÍÀÇ ´ÙÀ½¿¡ ¿À´Â ij¸¯ÅÍÀÇ À妽º
¿¹¿Ü:
IllegalArgumentException - beginIndex ¿Í endIndex ¿¡ ÀÇÇØ ÁöÁ¤µÇ´Â ºÎºÐ ¹üÀ§°¡ ÅØ½ºÆ® ¹üÀ§¿Ü¿¡ ÀÖ´Â °æ¿ì
°ü·Ã Ç׸ñ:
Annotation

AttributedString

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

ÆÄ¶ó¹ÌÅÍ:
text - ¼Ó¼º ÷ºÎ ij¸¯ÅÍ ¶óÀÎÀÇ ÅØ½ºÆ®
beginIndex - ¹üÀ§ÀÇ ¼±µÎ ij¸¯ÅÍÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ÃÖÁ¾ ij¸¯ÅÍÀÇ ´ÙÀ½¿¡ ¿À´Â ij¸¯ÅÍÀÇ À妽º
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 - ¹üÀ§ÀÇ ¼±µÎ ij¸¯ÅÍÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ÃÖÁ¾ ij¸¯ÅÍÀÇ ´ÙÀ½¿¡ ¿À´Â ij¸¯ÅÍÀÇ À妽º
¿¹¿Ü:
IllegalArgumentException - beginIndex °¡ 0 º¸´Ù ÀÛÀº °æ¿ì, endIndex °¡ ij¸¯ÅÍ ¶óÀÎÀ庸´Ù Å« °æ¿ì, ¶Ç´Â beginIndex ¿Í endIndex ÀÇ Æí¼ºÀÌ Ä³¸¯ÅÍ ¶óÀÎÀÇ ÇÏ´ÃÀÌ ¾Æ´Ñ ºÎºÐ ¹üÀ§¸¦ Á¤ÀÇÇÏÁö ¾Ê´Â °æ¿ì

addAttributes

public void addAttributes(Map  attributes,
                          int beginIndex,
                          int endIndex)
¼Ó¼º ¼¼Æ®¸¦ ij¸¯ÅÍ ¶óÀÎÀÇ ºÎºÐ ¹üÀ§¿¡ Ãß°¡ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
attributes - ij¸¯ÅÍ ¶óÀο¡ Ãß°¡ÇÏ´Â ¼Ó¼º
beginIndex - ¹üÀ§ÀÇ ¼±µÎ ij¸¯ÅÍÀÇ À妽º
endIndex - ¹üÀ§ÀÇ ÃÖÁ¾ ij¸¯ÅÍÀÇ ´ÙÀ½¿¡ ¿À´Â ij¸¯ÅÍÀÇ À妽º
¿¹¿Ü:
IllegalArgumentException - beginIndex °¡ 0 º¸´Ù ÀÛÀº °æ¿ì, endIndex °¡ ij¸¯ÅÍ ¶óÀÎÀ庸´Ù Å« °æ¿ì, ¶Ç´Â beginIndex ¿Í endIndex ÀÇ Æí¼ºÀÌ Ä³¸¯ÅÍ ¶óÀÎÀÇ ÇÏ´ÃÀÌ ¾Æ´Ñ ºÎºÐ ¹üÀ§¸¦ Á¤ÀÇÇÏÁö ¾Ê°í ¼Ó¼º ÆÄ¶ó¹ÌÅͰ¡ ÇÏ´ÃÀÇ Map °¡ ¾Æ´Ñ °æ¿ì

getIterator

public AttributedCharacterIterator  getIterator()
ij¸¯ÅÍ ¶óÀÎÀÇ ³»¿ë Àüü¿¡ÀÇ ¾×¼¼½º¸¦ Á¦°øÇÏ´Â AttributedCharacterIterator ÀÇ ÀνºÅϽº¸¦ »ý¼ºÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÅØ½ºÆ®¿Í ±× ÅØ½ºÆ®ÀÇ ¼Ó¼º¿¡ÀÇ ¾×¼¼½º¸¦ Á¦°øÇÏ´Â ¹Ýº¹ÀÚ

getIterator

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

ÆÄ¶ó¹ÌÅÍ:
attributes - Ŭ¶óÀÌ¾ðÆ®°¡ °ü½ÉÀ» °¡Áö´Â ¼Ó¼ºÀÇ ¸®½ºÆ®
¹Ýȯ°ª:
ÅØ½ºÆ®¿Í ±× ¼Ó¼º¿¡ÀÇ ¾×¼¼½º¸¦ Á¦°øÇÏ´Â ¹Ýº¹ÀÚ

getIterator

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

ÆÄ¶ó¹ÌÅÍ:
attributes - Ŭ¶óÀÌ¾ðÆ®°¡ °ü½ÉÀ» °¡Áö´Â ¼Ó¼ºÀÇ ¸®½ºÆ®
beginIndex - ¼±µÎ ij¸¯ÅÍÀÇ À妽º
endIndex - ¸¶Áö¸· ij¸¯ÅÍÀÇ ´ÙÀ½¿¡ ¿À´Â ij¸¯ÅÍÀÇ À妽º
¹Ýȯ°ª:
ÅØ½ºÆ®¿Í ±× ¼Ó¼º¿¡ÀÇ ¾×¼¼½º¸¦ Á¦°øÇÏ´Â ¹Ýº¹ÀÚ
¿¹¿Ü:
IllegalArgumentException - beginIndex °¡ 0 º¸´Ù ÀÛÀº °æ¿ì, endIndex °¡ ij¸¯ÅÍ ¶óÀÎÀ庸´Ù Å« °æ¿ì, ¶Ç´Â beginIndex °¡ endIndex º¸´Ù Å« °æ¿ì

JavaTM 2
Platform
Std.  Ed.  v1. 4.0

¹ö±×ÀÇ º¸°í¿Í ±â´ÉÀÇ ¸®Äù½ºÆ®
ÀÌ¿ÜÀÇ API ·¹ÆÛ·±½º ¹× °³¹ßÀÚ¿ë ¹®¼­¿¡ ´ëÇØ¼­´Â Java 2 SDK SE °³¹ßÀÚ¿ë ¹®¼­¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä. °³¹ßÀÚÀü¿ëÀÇ »ó¼¼ÇÑ ÇØ¼³, °³³äÀÇ °³¿ä, ¿ë¾îÀÇ Á¤ÀÇ, ¹ö±×ÀÇ È¸ÇÇÃ¥, ¹× ÄÚµå ½Ç·Ê°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.

Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ À־ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.