JavaTM 2 Platform
Standard Ed. 5.0

javax.swing.text
Ŭ·¡½º StyleContext

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.swing.text.StyleContext
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
Serializable, AbstractDocument.AttributeContext
¾Ë·ÁÁø Á÷°è ¼­ºê Ŭ·¡½º:
StyleSheet

public class StyleContext
extends Object
implements Serializable, AbstractDocument.AttributeContext

¼­½Ä ¹× °ü·ÃµÈ ÀÚ¿øÀÇ Ç®ÀÔ´Ï´Ù. ÀÌ Å¬·¡½º´Â ´Ù¾çÇÑ ¼­½Ä Á¤ÀÇ¿¡ ÀÇÇØ ÀçÀÌ¿ëµÇ´Â ÆùÆ® ¹× »öµîÀÌ ´Ù¾çÇÑ ÀÚ¿øÀÇ Ä³½¬¸¦ º¸°ü À¯ÁöÇÏ´Â ÄÁÅ×À̳ʰ¡ µÇ´Â °ÍÀ¸·Î ÀÚ¿øÀÇ ±×·ìÀÇ ¼ö¸íÀ» °áÁ¤ÇÕ´Ï´Ù. ÇÊ¿äÇÑ °æ¿ì, ÀÌ°ÍÀº °ü·Ã ÀÚ¿øÀ» ÃÖ´ëÇÑÀ¸·Î °øÀ¯Çϱâ À§Çؼ­ º¹¼öÀÇ ¹®¼­·Î °øÀ¯ÇÒ ¼ö ÀÖ½À´Ï´Ù.

¶Ç, ÀÌ Å¬·¡½º´Â ¼Ó¼ºÀÇ ÀÛÀº ¼¼Æ®¿¡ ´ëÇÑ È¿À²ÀûÀÎ Áö¿ø¸¦ Á¦°øÇØ, »ç¿ëÀ» °øÀ¯ÇÏ´Â °ÍÀ¸·Î ¼Ó¼ºÀ» ¾ÐÃàÇØ, ±×·¯ÇÑ º¯°æ ºÒ°¡´ÉÇÑ ¼ºÁúÀ» ÃÖ´ëÇÑÀ¸·Î ÀÌ¿ëÇÕ´Ï´Ù. ¸¹Àº ¼­½ÄÀº º¹Á¦µÇ¹Ç·Î °øÀ¯ÀÇ °¡´É¼ºÀÌ Ä¿Á®, Ä«ÇÇ°¡ ¸î¹øÀ̳ª »ç¿ëµË´Ï´Ù. Å« ¼¼Æ®´Â °øÀ¯ÀÇ °¡´É¼ºÀ» °¨¼Ò½ÃÅ°¹Ç·Î ÇÊ¿¬ÀûÀ¸·Î ¿ë·® È¿À²ÀÌ µÚ¶³¾îÁø ±¸ÇöÀÌ µË´Ï´Ù.

°æ°í: ÀÌ Å¬·¡½ºÀÇ Á÷·ÄÈ­ µÈ °´Ã¼´Â ÇâÈÄÀÇ Swing ¸±¸®Áî¿Í ȣȯµÇÁö ¾ÊÀ» ¿¹Á¤ÀÔ´Ï´Ù. ÇöÀçÀÇ Á÷·ÄÈ­ÀÇ Áö¿øÀº ´Ü±â°£ÀÇ ¿î¿ëÀ̳ª, °°Àº ¹öÀüÀÇ Swing¸¦ ½ÇÇàÇÏ´Â ¾îÇø®ÄÉÀ̼ǰ£ÀÇ RMI¿¡ ÀûÀýÇÏ°í ÀÖ½À´Ï´Ù. JDK ¹öÀü 1.4 ÀÌÈÄ, ¸ðµç JavaBeans Àå±â°£ÀÇ ¿î¿ë Áö¿øÀº java.beans ÆÐÅ°Áö¿¡ Ãß°¡µÇ°í ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº XMLEncoder¸¦ ÂüÁ¶ÇϽʽÿÀ.


Áßø(Nested) Ŭ·¡½º °³¿ä
 class StyleContext.NamedStyle
          º¸Åë, ¹®ÀÚ ¹× ´Ü¶ôÀÇ ¼­½ÄÀ» ³ªÅ¸³»±â À§Çؼ­ »ç¿ëµÇ´Â ¼Ó¼ºÀÇ Ä÷º¼ÇÀÔ´Ï´Ù.
 class StyleContext.SmallAttributeSet
          ÀÌ Å¬·¡½º´Â ¼Ò¼öÀÇ ¼Ó¼ºÀ» ¹è¿­·Î¼­ Æ÷ÇÔÇÕ´Ï´Ù.
 
ÇÊµå °³¿ä
static String DEFAULT_STYLE
          ´Ü¶ô¿¡ Á¢¼ÓµÇ´Â µðÆúÆ®ÀÇ ³í¸® ¼­½Ä¿¡ ºÙÀÏ ¼ö ÀÖ´Â À̸§ÀÔ´Ï´Ù.
 
»ý¼ºÀÚ °³¿ä
StyleContext ()
          »õ·Î¿î StyleContext °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 AttributeSet addAttribute (AttributeSet  old, Object  name, Object  value)
          ÁöÁ¤µÈ ¼¼Æ®¿¡ ¼Ó¼ºÀ» Ãß°¡ÇØ, ±× »õ·Î¿î ¼¼Æ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 AttributeSet addAttributes (AttributeSet  old, AttributeSet  attr)
          ¼Ó¼º ¼¼Æ®¸¦ ¿ä¼Ò¿¡ Ãß°¡ÇÕ´Ï´Ù.
 void addChangeListener (ChangeListener  l)
          ¼­½ÄÀÌ Ãß°¡ ¶Ç´Â »èÁ¦µÉ ¶§ º¯°æÀ» ÃßÀûÇÏ´Â ¸®½º³Ê¸¦ Ãß°¡ÇÕ´Ï´Ù.
 Style addStyle (String  nm, Style  parent)
          ¼­½Ä °èÃþ¿¡ »õ·Î¿î ¼­½ÄÀ» Ãß°¡ÇÕ´Ï´Ù.
protected  MutableAttributeSet createLargeAttributeSet (AttributeSet  a)
          ¸Þ¸ð¸® È¿À²º¸´Ù ó¸® ½Ã°£À» ¿ì¼±ÇÏ´Â °æ¿ì¸¦ À§ÇÑ, Å« »çÀÌÁîÀÇ ¼Ó¼º ¼¼Æ®¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
protected  StyleContext.SmallAttributeSet createSmallAttributeSet (AttributeSet  a)
          °øÀ¯ °¡´ÉÇÏ°í ÄÄÆÑÆ®ÇÑ ¼Ó¼º ¼¼Æ®¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
 Color getBackground (AttributeSet  attr)
          ¼Ó¼º ¼¼Æ®¸¦ ¹é±×¶ó¿îµå Ä÷¯ÀÇ ÁöÁ¤À¸·Î º¯È¯ÇÕ´Ï´Ù.
 ChangeListener [] getChangeListeners ()
          addChangeListener()¿¡ ÀÇÇØ ÀÌ StyleContext¿¡ Ãß°¡µÈ, Àü ChangeListener·Î ºÎÅÍ µÇ´Â ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù.
protected  int getCompressionThreshold ()
          ÀÏÀÇ·Î º¯°æÀÌ ºÒ°¡´ÉÇÑ ¼¼Æ®¿¡ ¾ÐÃàÀ» ½ÃµµÇÏ´Â Å°¿Í °ªÀÇ Æä¾îÀÇ ÃÖ´ë¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static StyleContext getDefaultStyleContext ()
          µ¶ÀÚÀûÀÎ ÄÁÅؽºÆ®¸¦ Á¤ÀÇ ¶Ç´Â °ø±ÞÇÏÁö ¾Ê´Â ¸ðµç ¹®¼­¿¡ ÀÇÇØ °øÀ¯µÇ´Â µðÆúÆ®ÀÇ AttributeContext¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 AttributeSet getEmptySet ()
          ºñ¾îÀÖ´Â ¼Ó¼º ¼¼Æ®¸¦ ²¨³À´Ï´Ù.
 Font getFont (AttributeSet  attr)
          ¼Ó¼º ¼¼Æ®·ÎºÎÅÍ ÆùÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 Font getFont (String  family, int style, int size)
          »õ·Î¿î ÆùÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 FontMetrics getFontMetrics (Font  f)
          ÆùÆ®¸ÞÆ®¸¯½º¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 Color getForeground (AttributeSet  attr)
          ¼Ó¼º ¼¼Æ®¸¦ foreground Ä÷¯ÀÇ ÁöÁ¤À¸·Î º¯È¯ÇÕ´Ï´Ù.
static Object getStaticAttribute (Object  key)
          Á÷Àü¿¡ registerStaticAttributeKey¿¡ µî·ÏµÈ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Object getStaticAttributeKey (Object  key)
          key¿¡ µî·ÏµÇ´Â String¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 Style getStyle (String  nm)
          ¹®¼­¿¡ ÀÌÀü¿¡ Ãß°¡µÈ À̸§ ÷ºÎÀÇ ¼­½ÄÀ» ²¨³À´Ï´Ù.
 Enumeration <? > getStyleNames ()
          Á¤Àǵǰí ÀÖ´Â ¼­½ÄÀÇ À̸§À» ²¨³À´Ï´Ù.
 void readAttributes (ObjectInputStream  in, MutableAttributeSet  a)
          ¼Ó¼ºÀ» ÀоîµéÀÌ´Â ÄÁÅؽºÆ® °íÀ¯ÀÇ Ã³¸®ÀÔ´Ï´Ù.
static void readAttributeSet (ObjectInputStream  in, MutableAttributeSet  a)
          ÁöÁ¤µÈ °´Ã¼ ÀÔ·Â ½ºÆ®¸²·ÎºÎÅÍ, writeAttributeSet·Î ÀÌÀü¿¡ Ãâ·ÂÇØÁö°í ÀÖ´Â ¼Ó¼º ¼¼Æ®¸¦ ÀоîµéÀÔ´Ï´Ù.
 void reclaim (AttributeSet  a)
          MutableAttributeSet ±¸Çö¿¡ ÀÇÇØ ÇÊ¿äÇÏ°Ô µÇÁö ¾Ê°Ô µÈ ¼¼Æ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static void registerStaticAttributeKey (Object  key)
          °´Ã¼¸¦, ¼Ó¼º ¼¼Æ®·Î Å°·Î¼­ »ç¿ëµÇ´Â static °´Ã¼·Î¼­ µî·ÏÇÕ´Ï´Ù.
 AttributeSet removeAttribute (AttributeSet  old, Object  name)
          ¼¼Æ®·ÎºÎÅÍ ¼Ó¼ºÀ» »èÁ¦ÇÕ´Ï´Ù.
 AttributeSet removeAttributes (AttributeSet  old, AttributeSet  attrs)
          ¿ä¼ÒÀÇ ¼Ó¼º ¼¼Æ®¸¦ »èÁ¦ÇÕ´Ï´Ù.
 AttributeSet removeAttributes (AttributeSet  old, Enumeration <? > names)
          ¿ä¼ÒÀÇ ¼Ó¼º ¼¼Æ®¸¦ »èÁ¦ÇÕ´Ï´Ù.
 void removeChangeListener (ChangeListener  l)
          ¼­½ÄÀÇ Ãß°¡ ¶Ç´Â »èÁ¦¸¦ ÃßÀûÇÏ°í ÀÖ´ø ¸®½º³Ê¸¦ »èÁ¦ÇÕ´Ï´Ù.
 void removeStyle (String  nm)
          ÀÌÀü¿¡ ¹®¼­¿¡ Ãß°¡µÈ À̸§ ÷ºÎ ¼­½ÄÀ» »èÁ¦ÇÕ´Ï´Ù.
 String toString ()
          ¼­½Ä ÄÁÅؽºÆ®¸¦ ij¸¯ÅÍ ¶óÀÎÀ¸·Î º¯È¯ÇÕ´Ï´Ù.
 void writeAttributes (ObjectOutputStream  out, AttributeSet  a)
          ¼Ó¼ºÀ» Ãâ·ÂÇÏ´Â ÄÁÅؽºÆ® °íÀ¯ÀÇ Ã³¸®ÀÔ´Ï´Ù.
static void writeAttributeSet (ObjectOutputStream  out, AttributeSet  a)
          Á÷·ÄÈ­¸¦ À§Çؼ­ ÁöÁ¤µÈ °´Ã¼ ½ºÆ®¸²¿¡ ¼Ó¼º ¼¼Æ®¸¦ Ãâ·ÂÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

ÇʵåÀÇ »ó¼¼

DEFAULT_STYLE

public static final String  DEFAULT_STYLE
´Ü¶ô¿¡ Á¢¼ÓµÇ´Â µðÆúÆ®ÀÇ ³í¸® ¼­½Ä¿¡ ºÙÀÏ ¼ö ÀÖ´Â À̸§ÀÔ´Ï´Ù.

°ü·Ã Ç׸ñ:
Á¤¼ö Çʵ尪
»ý¼ºÀÚ »ó¼¼

StyleContext

public StyleContext()
»õ·Î¿î StyleContext °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

¸Þ¼­µåÀÇ »ó¼¼

getDefaultStyleContext

public static final StyleContext  getDefaultStyleContext()
µ¶ÀÚÀûÀÎ ÄÁÅؽºÆ®¸¦ Á¤ÀÇ ¶Ç´Â °ø±ÞÇÏÁö ¾Ê´Â ¸ðµç ¹®¼­¿¡ ÀÇÇØ °øÀ¯µÇ´Â µðÆúÆ®ÀÇ AttributeContext¸¦ ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÄÁÅؽºÆ®

addStyle

public Style  addStyle(String  nm,
                      Style  parent)
¼­½Ä °èÃþ¿¡ »õ·Î¿î ¼­½ÄÀ» Ãß°¡ÇÕ´Ï´Ù. ¼­½ÄÀÇ ¼Ó¼ºÀº ¾Æ·¡¿¡¼­ À§·Î ÇâÇØ Çؼ® 󸮵ǹǷÎÀÚ½Ä ·Î ÁöÁ¤µÈ ¼Ó¼ºÀº ºÎ¸ð·Î ÁöÁ¤µÈ ¼Ó¼ºÀ» ¿À¹ö¶óÀ̵å(override) ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
nm - ¼­½ÄÀÇ À̸§. ÀÌ À̸§Àº ¹®¼­³»ÀÇ À̸§ ÷ºÎ ¼­½ÄÀÇ Ä÷º¼Ç ¾È¿¡¼­ ÀÏÀÇ°¡ ¾Æ´Ï¸é ¾ÈµÈ´Ù. À̸§Àº ¼­½Ä¿¡ À̸§ÀÌ ºÙÁö ¾ÊÀº °æ¿ì´Â nullµµ °¡´ÉÇÏÁö¸¸, È£ÃâÃøÀº À̸§ÀÌ ¾ø´Â ¼­½ÄÀÌ À̸§À¸·Î ÃëµæÇÒ ¼ö ¾ø´Â °æ¿ì¿¡ ¸®ÅÏµÈ ÂüÁ¶¸¦ °ü¸®ÇØ¾ß ÇÑ´Ù. À̸§ÀÌ ¾ø´Â ¼­½ÄÀº ½ºÅ¸ÀÏ ·±À¸·Î º¼ ¼ö ÀÖ´Â °Í °°Àº ¹®ÀÚ ¼Ó¼ºÀÇ ¿À¹ö¶óÀ̵å(override)µîÀ¸·Î Æí¸®ÇÑ °æ¿ì°¡ ÀÖ´Â
parent - Ä£¼­½Ä. ÁöÁ¤µÇ¾î ÀÖÁö ¾ÊÀº ¼Ó¼ºÀÌ ´Ù¸¥ ¼­½Ä¿¡¼­ Çؼ® ó¸®µÉ ÇÊ¿ä°¡ ¾ø´Â °æ¿ì´Â nullµµ °¡´É
¹Ýȯ°ª:
ÀÛ¼ºµÈ ¼­½Ä

removeStyle

public void removeStyle(String  nm)
ÀÌÀü¿¡ ¹®¼­¿¡ Ãß°¡µÈ À̸§ ÷ºÎ ¼­½ÄÀ» »èÁ¦ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
nm - »èÁ¦µÇ´Â ¼­½ÄÀÇ À̸§

getStyle

public Style  getStyle(String  nm)
¹®¼­¿¡ ÀÌÀü¿¡ Ãß°¡µÈ À̸§ ÷ºÎÀÇ ¼­½ÄÀ» ²¨³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
nm - ¼­½ÄÀÇ À̸§
¹Ýȯ°ª:
¼­½Ä

getStyleNames

public Enumeration <? > getStyleNames()
Á¤Àǵǰí ÀÖ´Â ¼­½ÄÀÇ À̸§À» ²¨³À´Ï´Ù.

¹Ýȯ°ª:
À̸§ÀÇ ¿­°ÅÀÇ ¸®½ºÆ®

addChangeListener

public void addChangeListener(ChangeListener  l)
¼­½ÄÀÌ Ãß°¡ ¶Ç´Â »èÁ¦µÉ ¶§ º¯°æÀ» ÃßÀûÇÏ´Â ¸®½º³Ê¸¦ Ãß°¡ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
l - º¯°æ ¸®½º³Ê

removeChangeListener

public void removeChangeListener(ChangeListener  l)
¼­½ÄÀÇ Ãß°¡ ¶Ç´Â »èÁ¦¸¦ ÃßÀûÇÏ°í ÀÖ´ø ¸®½º³Ê¸¦ »èÁ¦ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
l - º¯°æ ¸®½º³Ê

getChangeListeners

public ChangeListener [] getChangeListeners()
addChangeListener()¿¡ ÀÇÇØ ÀÌ StyleContext¿¡ Ãß°¡µÈ, Àü ChangeListener·Î ºÎÅÍ µÇ´Â ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
Ãß°¡µÈ ¸ðµç ChangeListener, ¶Ç´Â ¸®½º³Ê°¡ Ãß°¡µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â ºñ¾îÀÖ´Â ¹è¿­
µµÀÔµÈ ¹öÀü :
1.4

getFont

public Font  getFont(AttributeSet  attr)
¼Ó¼º ¼¼Æ®·ÎºÎÅÍ ÆùÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ÁöÁ¤µÈ ¼Ó¼º ¼¼Æ®¿¡ ´ëÇؼ­ ij½¬µÈ ÆùÆ®ÀÇ ÃëµæÀ» ½ÃµµÇϱâ À§Çؼ­ ±¸ÇöµË´Ï´Ù. ÀÌ ÃëµæÀÌ ½ÇÆÐÇßÀ» °æ¿ì, ÆùÆ® ±â´ÉÀÌ Çؼ® 󸮵Ǿî ÆùÆ®´Â Àú·¹º§ÀÇ ÆùÆ® ij½¬·ÎºÎÅÍ ÃëµæµË´Ï´Ù.

ÆĶó¹ÌÅÍ:
attr - ¼Ó¼º ¼¼Æ®
¹Ýȯ°ª:
ÆùÆ®

getForeground

public Color  getForeground(AttributeSet  attr)
¼Ó¼º ¼¼Æ®¸¦ foreground Ä÷¯ÀÇ ÁöÁ¤À¸·Î º¯È¯ÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¹àÀ½À̳ª »öÁ¶µîÀ» °­Á¶Çϱâ À§Çؼ­ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù. µðÆúÆ®¿¡¼­´Â ´Ü¼øÇÏ°Ô StyleConstants.Foreground ¼Ó¼ºÀ¸·Î ÁöÁ¤µÈ °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
attr - ¼Ó¼º ¼¼Æ®
¹Ýȯ°ª:
»ö

getBackground

public Color  getBackground(AttributeSet  attr)
¼Ó¼º ¼¼Æ®¸¦ ¹é±×¶ó¿îµå Ä÷¯ÀÇ ÁöÁ¤À¸·Î º¯È¯ÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¹àÀ½À̳ª »öÁ¶µîÀ» °­Á¶Çϱâ À§Çؼ­ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù. µðÆúÆ®¿¡¼­´Â ´Ü¼øÇÏ°Ô StyleConstants.Background ¼Ó¼ºÀ¸·Î ÁöÁ¤µÈ °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
attr - ¼Ó¼º ¼¼Æ®
¹Ýȯ°ª:
»ö

getFont

public Font  getFont(String  family,
                    int style,
                    int size)
»õ·Î¿î ÆùÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ÆùÆ®°¡ ij½¬µÇ°í ÀÖ´Â °æ¿ì¿¡ ij½¬·ÎºÎÅÍ ÆùÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. ÆùÆ®°¡ ij½¬µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì, ÆùÆ®°¡ ij½¬¿¡ Ãß°¡µË´Ï´Ù. ÀÌ°ÍÀº ±âº»ÀûÀ¸·Î 1.1 ÆùÆ® ±â´ÉÀÇ Àú·¹º§ÀÇ Ä³½¬ÀÔ´Ï´Ù.

ÆĶó¹ÌÅÍ:
family - ÆùÆ® Æйи® ( ¡¸Monospaced¡¹ µî)
style - ÆùÆ®ÀÇ ¼­½Ä (Font.PLAIN µî)
size - Æ÷ÀÎÆ® »çÀÌÁî >= 1
¹Ýȯ°ª:
»õ·Î¿î ÆùÆ®

getFontMetrics

public FontMetrics  getFontMetrics(Font  f)
ÆùÆ®¸ÞÆ®¸¯½º¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
f - ÆùÆ®
¹Ýȯ°ª:
¸ÞÆ®¸¯½º

addAttribute

public AttributeSet  addAttribute(AttributeSet  old,
                                 Object  name,
                                 Object  value)
ÁöÁ¤µÈ ¼¼Æ®¿¡ ¼Ó¼ºÀ» Ãß°¡ÇØ, ±× »õ·Î¿î ¼¼Æ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÕ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼­µå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ addAttribute
ÆĶó¹ÌÅÍ:
old - ±¸¼Ó¼º ¼¼Æ®
name - null ÀÌ¿ÜÀÇ ¼Ó¼º¸í
value - ¼Ó¼º°ª
¹Ýȯ°ª:
°»½Å ¼Ó¼º ¼¼Æ®
°ü·Ã Ç׸ñ:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes

public AttributeSet  addAttributes(AttributeSet  old,
                                  AttributeSet  attr)
¼Ó¼º ¼¼Æ®¸¦ ¿ä¼Ò¿¡ Ãß°¡ÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÕ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼­µå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ addAttributes
ÆĶó¹ÌÅÍ:
old - ±¸¼Ó¼º ¼¼Æ®
attr - Ãß°¡ÇÏ´Â ¼Ó¼º
¹Ýȯ°ª:
°»½Å ¼Ó¼º ¼¼Æ®
°ü·Ã Ç׸ñ:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute

public AttributeSet  removeAttribute(AttributeSet  old,
                                    Object  name)
¼¼Æ®·ÎºÎÅÍ ¼Ó¼ºÀ» »èÁ¦ÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÕ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼­µå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ removeAttribute
ÆĶó¹ÌÅÍ:
old - ±¸¼Ó¼º ¼¼Æ®
name - null ÀÌ¿ÜÀÇ ¼Ó¼º¸í
¹Ýȯ°ª:
°»½Å ¼Ó¼º ¼¼Æ®
°ü·Ã Ç׸ñ:
MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes

public AttributeSet  removeAttributes(AttributeSet  old,
                                     Enumeration <? > names)
¿ä¼ÒÀÇ ¼Ó¼º ¼¼Æ®¸¦ »èÁ¦ÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÕ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼­µå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ removeAttributes
ÆĶó¹ÌÅÍ:
old - ±¸¼Ó¼º ¼¼Æ®
names - ¼Ó¼º¸í
¹Ýȯ°ª:
°»½Å ¼Ó¼º ¼¼Æ®
°ü·Ã Ç׸ñ:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes

public AttributeSet  removeAttributes(AttributeSet  old,
                                     AttributeSet  attrs)
¿ä¼ÒÀÇ ¼Ó¼º ¼¼Æ®¸¦ »èÁ¦ÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÕ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼­µå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ removeAttributes
ÆĶó¹ÌÅÍ:
old - ±¸¼Ó¼º ¼¼Æ®
attrs - ¼Ó¼º
¹Ýȯ°ª:
°»½Å ¼Ó¼º ¼¼Æ®
°ü·Ã Ç׸ñ:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

getEmptySet

public AttributeSet  getEmptySet()
ºñ¾îÀÖ´Â ¼Ó¼º ¼¼Æ®¸¦ ²¨³À´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ getEmptySet
¹Ýȯ°ª:
¼¼Æ®

reclaim

public void reclaim(AttributeSet  a)
MutableAttributeSet ±¸Çö¿¡ ÀÇÇØ ÇÊ¿äÇÏ°Ô µÇÁö ¾Ê°Ô µÈ ¼¼Æ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¾àÂüÁ¶°¡ ¾ø´Â 1.1 ¿¡¼­ÀÇ Ã³¸®¿¡ Æí¸®ÇÕ´Ï´Ù. º¸Åë, ÀÌ ¸Þ¼­µå´Â MutableAttributeSet ±¸ÇöÀÇ finalize ¸Þ¼­µå¿¡ ÀÇÇØ È£ÃâÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÕ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼­µå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º AbstractDocument.AttributeContext ³»ÀÇ reclaim
ÆĶó¹ÌÅÍ:
a - Àç»ýÇÏ´Â ¼¼Æ®

getCompressionThreshold

protected int getCompressionThreshold()
ÀÏÀÇ·Î º¯°æÀÌ ºÒ°¡´ÉÇÑ ¼¼Æ®¿¡ ¾ÐÃàÀ» ½ÃµµÇÏ´Â Å°¿Í °ªÀÇ Æä¾îÀÇ ÃÖ´ë¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. ÀÌ Á¦ÇÑÀ» ³Ñ´Â ¼¼Æ®´Â Çؽà Å×À̺íÀ» »ç¿ëÇØ, MutableAttributeSet°¡ µË´Ï´Ù.

¹Ýȯ°ª:
ÇØ ±ÍÀÇÄ¡

createSmallAttributeSet

protected StyleContext.SmallAttributeSet  createSmallAttributeSet(AttributeSet  a)
°øÀ¯ °¡´ÉÇÏ°í ÄÄÆÑÆ®ÇÑ ¼Ó¼º ¼¼Æ®¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ÀÌ°ÍÀº ¼­ºê Ŭ·¡½º¿¡¼­ SmallAttributeSet µ¿ÀÛÀ» º¯°æÇÏ°í ½ÍÀº °æ¿ì¿¡ ¼­ºê Ŭ·¡½º¿¡¼­ ÀÌ¿ëÇϱâ À§ÇÑ ÈÅÀÔ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¼Ó¼º º¯È¯À» Á¦°øÇÏ´Â AttributeSet¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ´Ù½Ã ±¸ÇöÇÒ ¼öµµ ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
a - ÄÄÆÑÆ®ÇÑ Çü½Ä¿¡¼­ Ç¥ÇöµÇ´Â ¼Ó¼º ¼¼Æ®

createLargeAttributeSet

protected MutableAttributeSet  createLargeAttributeSet(AttributeSet  a)
¸Þ¸ð¸® È¿À²º¸´Ù ó¸® ½Ã°£À» ¿ì¼±ÇÏ´Â °æ¿ì¸¦ À§ÇÑ, Å« »çÀÌÁîÀÇ ¼Ó¼º ¼¼Æ®¸¦ ÀÛ¼ºÇÕ´Ï´Ù. º¸Åë, ÀÌ ¼¼Æ®ÀÇ °øÀ¯´Â °ï¶õÇÕ´Ï´Ù. ÀÌ°ÍÀº Å« »çÀÌÁîÀÇ ¼Ó¼º Æ÷ÇÔ Çü½Ä (µðÆúÆ®¿¡¼­´Â SimpleAttributeSet)ÀÇ µ¿ÀÛÀ» ¼­ºê Ŭ·¡½º¿¡¼­ º¯°æÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì¿¡ ¼­ºê Ŭ·¡½º¿¡¼­ ÀÌ¿ëÇϱâ À§ÇÑ ÈÅÀÔ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¼Ó¼º º¯È¯À» Á¦°øÇÏ´Â MutableAttributeSet¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ´Ù½Ã ±¸ÇöÇÒ ¼öµµ ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
a - »çÀÌÁîÀÇ Å« Çü½Ä¿¡¼­ Ç¥ÇöµÇ´Â ¼Ó¼º ¼¼Æ®

toString

public String  toString()
¼­½Ä ÄÁÅؽºÆ®¸¦ ij¸¯ÅÍ ¶óÀÎÀ¸·Î º¯È¯ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ toString
¹Ýȯ°ª:
ij¸¯ÅÍ ¶óÀÎ

writeAttributes

public void writeAttributes(ObjectOutputStream  out,
                            AttributeSet  a)
                     throws IOException 
¼Ó¼ºÀ» Ãâ·ÂÇÏ´Â ÄÁÅؽºÆ® °íÀ¯ÀÇ Ã³¸®ÀÔ´Ï´Ù.

¿¹¿Ü:
IOException

readAttributes

public void readAttributes(ObjectInputStream  in,
                           MutableAttributeSet  a)
                    throws ClassNotFoundException,

                           IOException 
¼Ó¼ºÀ» ÀоîµéÀÌ´Â ÄÁÅؽºÆ® °íÀ¯ÀÇ Ã³¸®ÀÔ´Ï´Ù.

¿¹¿Ü:
ClassNotFoundException
IOException

writeAttributeSet

public static void writeAttributeSet(ObjectOutputStream  out,
                                     AttributeSet  a)
                              throws IOException 
Á÷·ÄÈ­¸¦ À§Çؼ­ ÁöÁ¤µÈ °´Ã¼ ½ºÆ®¸²¿¡ ¼Ó¼º ¼¼Æ®¸¦ Ãâ·ÂÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â Ưº°È÷ ÁÖÀÇÇØ, registerStaticAttributeKey ¸Þ¼­µå·Î µî·ÏµÇ¾î ÀÖ´Â static ¼Ó¼º Å°¸¦ ó¸®ÇÕ´Ï´Ù. static Å°·Î¼­ µî·ÏµÇÁö ¾ÊÀº ¼Ó¼º Å°´Â Á÷Á¢ Á÷·ÄÈ­ µË´Ï´Ù. ¸ðµç °ªÀÌ Á÷·ÄÈ­ °¡´ÉÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
out - Ãâ·Â ½ºÆ®¸²
a - ¼Ó¼º ¼¼Æ®
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

readAttributeSet

public static void readAttributeSet(ObjectInputStream  in,
                                    MutableAttributeSet  a)
                             throws ClassNotFoundException,

                                    IOException 
ÁöÁ¤µÈ °´Ã¼ ÀÔ·Â ½ºÆ®¸²·ÎºÎÅÍ, writeAttributeSet·Î ÀÌÀü¿¡ Ãâ·ÂÇØÁö°í ÀÖ´Â ¼Ó¼º ¼¼Æ®¸¦ ÀоîµéÀÔ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â registerStaticAttributeKey ¸Þ¼­µå·Î µî·ÏµÇ¾î ÀÖ´Â Å°¸¸À» °í·ÁÇÏ´Â ÇöÀçÀÇ °¡»ó ¸Ó½ÅÀ¸·Î static °´Ã¼¿´´ø Å°¸¦ static °´Ã¼¿¡ º¹¿øÇÏ·Á°í ÇÕ´Ï´Ù. ½ºÆ®¸²·ÎºÎÅÍ ²¨³»Áø ¼Ó¼ºÀº ÁöÁ¤µÈ º¯°æÀÌ °¡´ÉÇÑ ¼¼Æ®¿¡ ¹èÄ¡µË´Ï´Ù.

ÆĶó¹ÌÅÍ:
in - ¼Ó¼º µ¥ÀÌÅ͸¦ ÀоîµéÀÌ´Â °´Ã¼ ½ºÆ®¸²
a - ¼Ó¼º Á¤ÀǸ¦ ¹èÄ¡ÇÏ´Â ¼Ó¼º ¼¼Æ®
¿¹¿Ü:
ClassNotFoundException - °´Ã¼ ½ºÆ®¸²À» ÀоîµéÀÏ ¶§ °ËÃâµÇ¾úÀ» °æ¿ì¿¡ À§¿¡°Ô °Ç³×Áø´Ù
IOException - °´Ã¼ ½ºÆ®¸²À» ÀоîµéÀÏ ¶§ °ËÃâµÇ¾úÀ» °æ¿ì¿¡ À§¿¡°Ô °Ç³×Áø´Ù

registerStaticAttributeKey

public static void registerStaticAttributeKey(Object  key)
°´Ã¼¸¦, ¼Ó¼º ¼¼Æ®·Î Å°·Î¼­ »ç¿ëµÇ´Â static °´Ã¼·Î¼­ µî·ÏÇÕ´Ï´Ù. ±× °á°ú, ±× Å°´Â Ưº°È÷ Á÷·ÄÈ­°¡ ó¸®µÇ°Ô µË´Ï´Ù.

1.1 °¡»ó ¸Ó½Å»ó¿¡¼­ÀÇ Ã³¸®ÀÇ °æ¿ì, ÀÌ ¸Þ¼­µå´Â Ŭ·¡½º¸í¿¡ ¿¬°áµÈ toString¿¡ ÀÇÇØ ¸®ÅÏµÈ °ªÀ» »ç¿ëÇÕ´Ï´Ù. toString¿¡ ÀÇÇØ ¸®ÅÏµÈ °ªÀº ³ªÁß¿¡ Àç°è»êµÉ ¶§ °°°Ô µÇµµ·Ï Çϱâ À§Çؼ­´Â ±× Áß¿¡ Ŭ·¡½º ÂüÁ¶¸¦ °®°ÔÇÒ ¼ö ¾ø½À´Ï´Ù. ±×°ÍÀº Object ³»ÀÇ Á¤ÀǷκÎÅÍ À籸ÇöµÇÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.

ÆĶó¹ÌÅÍ:
key - null ÀÌ¿ÜÀÇ °´Ã¼ Å°

getStaticAttribute

public static Object  getStaticAttribute(Object  key)
Á÷Àü¿¡ registerStaticAttributeKey¿¡ µî·ÏµÈ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù.


getStaticAttributeKey

public static Object  getStaticAttributeKey(Object  key)
key¿¡ µî·ÏµÇ´Â String¸¦ ¸®ÅÏÇÕ´Ï´Ù.

°ü·Ã Ç׸ñ:
getStaticAttribute(java.lang.Object), registerStaticAttributeKey(java.lang.Object)

JavaTM 2 Platform
Standard Ed. 5.0

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