JavaTM 2 Platform
Standard Ed. 5.0

java.beans
Ŭ·¡½º PropertyEditorSupport

java.lang.Object 
  »óÀ§¸¦ È®Àå java.beans.PropertyEditorSupport
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
PropertyEditor

public class PropertyEditorSupport
extends Object
implements PropertyEditor

ÇÁ·ÎÆÛƼ ¿¡µðÅÍÀÇ ±¸Ãà¿¡ µµ¿òÀÌ µÇ´Â Áö¿ø Ŭ·¡½ºÀÔ´Ï´Ù.

base class ¶Ç´Â À§¾ç µÇ´Â ÃøÀ¸·Î¼­ »ç¿ë °¡´ÉÇÕ´Ï´Ù.


»ý¼ºÀÚ °³¿ä
PropertyEditorSupport ()
          PropertyEditorSupport °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
PropertyEditorSupport (Object  source)
          PropertyEditorSupport °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 void addPropertyChangeListener (PropertyChangeListener  listener)
          PropertyChange À̺¥Æ®ÀÇ ¸®½º³Ê¸¦ µî·ÏÇÕ´Ï´Ù.
 void firePropertyChange ()
          °ü·Ã ¸®½º³Ê°¡ ¸ðµÎ »èÁ¦µÈ °ÍÀ» º¸°íÇÕ´Ï´Ù.
 String getAsText ()
          ÇÁ·ÎÆÛƼġ¸¦, Àΰ£ÀÌ ÆíÁýÇϴµ¥ ÀûÇÕÇÑ Ä³¸¯ÅÍ ¶óÀÎÀÇ Çü½Ä¿¡¼­ ÃëµæÇÕ´Ï´Ù.
 Component getCustomEditor ()
          PropertyEditor´Â ÇÁ·ÎÆÛƼġ¸¦ ÆíÁýÇÏ´Â ¿ÏÀüÇÑ Ä¿½ºÅÒ ÄÄÆÛ³ÍÆ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
 String getJavaInitializationString ()
          Java Äڵ带 »ý¼ºÇØ ÇÁ·ÎÆÛƼġ¸¦ ¼³Á¤ÇÒ °æ¿ì¿¡ »ç¿ëÇÕ´Ï´Ù.
 Object getSource ()
          À̺¥Æ® ¼Ò½º·Î¼­ »ç¿ëµÇ´Â Bean¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 String [] getTags ()
          ÇÁ·ÎÆÛƼ°ªÀÌ ±âÁ¸ÀÇ ÅÂ±× Ã·À߸øµÈ °ª ¼¼Æ®ÀÇ 1°³°¡ ¾Æ´Ï¸é ¾ÈµÇ´Â °æ¿ì¿¡ ű×Ä¡ÀÇ ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù.
 Object getValue ()
          ÇÁ·ÎÆÛƼÀÇ °ªÀ» ÃëµæÇÕ´Ï´Ù.
 boolean isPaintable ()
          Å¬·¡½º°¡ paintValue ¸Þ¼­µå¸¦ ¹ÞÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
 void paintValue (Graphics  gfx, Rectangle  box)
          °ªÀÇ Ç¥ÇöÀ» È­¸éÀÇ ÁöÁ¤µÈ ¿µ¿ª¿¡ ·»´õ¸µ ÇÕ´Ï´Ù.
 void removePropertyChangeListener (PropertyChangeListener  listener)
          PropertyChange À̺¥Æ®ÀÇ ¸®½º³Ê¸¦ »èÁ¦ÇÕ´Ï´Ù.
 void setAsText (String  text)
          ÁöÁ¤µÈ String (ij¸¯ÅÍ ¶óÀÎ)¸¦ Çؼ®ÇØ ÇÁ·ÎÆÛƼġ¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setSource (Object  source)
          ¼Ò½º Bean¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setValue (Object  value)
          ÆíÁý ´ë»óÀÇ °´Ã¼¸¦ ¼³Á¤ ¶Ç´Â º¯°æÇÕ´Ï´Ù.
 boolean supportsCustomEditor ()
          propertyEditor°¡ Ä¿½ºÅÒ ¿¡µðÅ͸¦ Áö¿øÇÒ ¼ö ÀÖÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

PropertyEditorSupport

public PropertyEditorSupport()
PropertyEditorSupport °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.

µµÀÔµÈ ¹öÀü :
1.5

PropertyEditorSupport

public PropertyEditorSupport(Object  source)
PropertyEditorSupport °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
source - À̺¥Æ® Æ®¸®°Å¿ë ¼Ò½º
µµÀÔµÈ ¹öÀü :
1.5
¸Þ¼­µåÀÇ »ó¼¼

getSource

public Object  getSource()
À̺¥Æ® ¼Ò½º·Î¼­ »ç¿ëµÇ´Â Bean¸¦ ¸®ÅÏÇÕ´Ï´Ù. ¼Ò½º°¡ ¸í½ÃÀûÀ¸·Î ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì, ÀÌ PropertyEditorSupport ÀνºÅϽº°¡ ¸®Åϵ˴ϴ٠.

¹Ýȯ°ª:
¼Ò½º °´Ã¼ ¶Ç´Â ÀÌ ÀνºÅϽº
µµÀÔµÈ ¹öÀü :
1.5

setSource

public void setSource(Object  source)
¼Ò½º Bean¸¦ ¼³Á¤ÇÕ´Ï´Ù.

¼Ò½º Bean´Â ÇÁ·ÎÆÛƼÀÇ º¯°æÀÇ À̺¥Æ® ¼Ò½º·Î¼­ »ç¿ëµË´Ï´Ù. ÀÌ ¼Ò½º´Â Á¤º¸¸¦ Á¦°øÇϱâ À§ÇØÀÎ ¸¸Å­ »ç¿ëµË´Ï´Ù. PropertyEditor¸¦ »ç¿ëÇØ º¯°æÀ» ´õÇÒ ¼ö ¾ø½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
source - À̺¥Æ®¿ë ¼Ò½º °´Ã¼
µµÀÔµÈ ¹öÀü :
1.5

setValue

public void setValue(Object  value)
ÆíÁý ´ë»óÀÇ °´Ã¼¸¦ ¼³Á¤ ¶Ç´Â º¯°æÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ setValue
ÆĶó¹ÌÅÍ:
value - ÆíÁý ´ë»óÀÇ »õ·Î¿î Ÿ°Ù °´Ã¼. ÀÌ °´Ã¼´Â PropertyEditor ·Î º¯°æÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó, PropertyEditor ·Î »õ·Î¿î °´Ã¼¸¦ ÀÛ¼ºÇØ º¯°æÄ¡¸¦ º¸Á¸ÇÑ´Ù

getValue

public Object  getValue()
ÇÁ·ÎÆÛƼÀÇ °ªÀ» ÃëµæÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ getValue
¹Ýȯ°ª:
ÇÁ·ÎÆÛƼÀÇ °ª

isPaintable

public boolean isPaintable()
Ŭ·¡½º°¡ paintValue ¸Þ¼­µå¸¦ ¹ÞÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ isPaintable
¹Ýȯ°ª:
Ŭ·¡½º°¡ paintValue ¸Þ¼­µå¸¦ ¹Þ´Â °æ¿ì´Â true

paintValue

public void paintValue(Graphics  gfx,
                       Rectangle  box)
°ªÀÇ Ç¥ÇöÀ» È­¸éÀÇ ÁöÁ¤µÈ ¿µ¿ª¿¡ ·»´õ¸µ ÇÕ´Ï´Ù. propertyEditor´Â µ¶ÀÚÀûÀΠŬ¸®ÇÎÀ» ½Ç½ÃÇØ, ÁöÁ¤µÈ ±¸Çü³»¿¡ ³Ö½À´Ï´Ù.

PropertyEditor°¡ ·»´õ¸µ ¿ä±¸¸¦ ¹Þ¾ÆµéÀÌÁö ¾Ê´Â °æ¿ì (isPaintable¸¦ ÂüÁ¶), ÀÌ ¸Þ¼­µå´Â ¾Æ¹«°Íµµ ½Ç½ÃÇÏÁö ¾Ê½À´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ paintValue
ÆĶó¹ÌÅÍ:
gfx - ·»´õ¸µ µÇ´Â ±×·¡ÇÈ °´Ã¼
box - ±×·¡ÇÈ °´Ã¼¸¦ ·»´õ¸µ ÇÏ´Â ±¸Çü

getJavaInitializationString

public String  getJavaInitializationString()
Java Äڵ带 »ý¼ºÇØ ÇÁ·ÎÆÛƼġ¸¦ ¼³Á¤ÇÒ °æ¿ì¿¡ »ç¿ëÇÕ´Ï´Ù. ÇöÀçÀÇ ÇÁ·ÎÆÛƼġ¸¦ °¡Áö´Â º¯¼öÀÇ ÃʱâÈ­¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â Java ÄÚµåÀÇ fragment¸¦ ¸®ÅÏÇÕ´Ï´Ù.

°á°ú¿¹·Î¼­ ¡¸2¡¹, ¡¸new Color(127,127,34)¡¹, ¡¸Color.orange¡¹µîÀÌ ÀÖ½À´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ getJavaInitializationString
¹Ýȯ°ª:
ÇöÀç°¡ÀÇ ÃʱâÈ­ÀÚ¸¦ ³ªÅ¸³»´Â Java ÄÚµåÀÇ fragment

getAsText

public String  getAsText()
ÇÁ·ÎÆÛƼġ¸¦, Àΰ£ÀÌ ÆíÁýÇϴµ¥ ÀûÇÕÇÑ Ä³¸¯ÅÍ ¶óÀÎÀÇ Çü½Ä¿¡¼­ ÃëµæÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ getAsText
¹Ýȯ°ª:
Àΰ£ÀÌ ÆíÁýÇϴµ¥ ÀûÇÕÇÑ Ä³¸¯ÅÍ ¶óÀÎÀÇ Çü½ÄÀÇ ÇÁ·ÎÆÛƼġ

°ªÀ» ij¸¯ÅÍ ¶óÀÎÀ¸·Î¼­ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì´Â nullÀ» µ¹·ÁÁØ´Ù

null ÀÌ¿ÜÀÇ °ªÀÌ µ¹·ÁÁÖ°íÁö¸é, PropertyEditor´Â ±× ij¸¯ÅÍ ¶óÀÎÀ» Çؼ®ÇØ setAsText()¿¡ µÇµ¹¸°´Ù


setAsText

public void setAsText(String  text)
               throws IllegalArgumentException 
ÁöÁ¤µÈ String (ij¸¯ÅÍ ¶óÀÎ)¸¦ Çؼ®ÇØ ÇÁ·ÎÆÛƼġ¸¦ ¼³Á¤ÇÕ´Ï´Ù. String ¼­½ÄÀÌ ºÎÁ¤ÇÑ °æ¿ì, ȤÀº ÇÁ·ÎÆÛƼ¸¦ ÅؽºÆ® Ç¥½ÃÇÒ ¼ö ¾ø´Â °æ¿ì´Â java.lang.IllegalArgumentException°¡ ¹ß»ý µË´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ setAsText
ÆĶó¹ÌÅÍ:
text - Çؼ®µÇ´Â ij¸¯ÅÍ ¶óÀÎ
¿¹¿Ü:
IllegalArgumentException

getTags

public String [] getTags()
ÇÁ·ÎÆÛƼ°ªÀÌ ±âÁ¸ÀÇ ÅÂ±× Ã·À߸øµÈ °ª ¼¼Æ®ÀÇ 1°³°¡ ¾Æ´Ï¸é ¾ÈµÇ´Â °æ¿ì¿¡ ű×Ä¡ÀÇ ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù. ¿¹¸¦ µé¾îÀÌ°ÍÀ» »ç¿ëÇØ ¿­°ÅÄ¡¸¦ Ç¥½ÃÇÒ ¼ö ÀÖ½À´Ï´Ù. PropertyEditor°¡ ű׸¦ Áö¿øÇÏ´Â °æ¿ì, °ªÀ» ¼³Á¤ÇÏ´Â ¹æ¹ýÀ¸·Î¼­ ÅÂ±× Ã·À߸øµÈ °ªÀ» °¡Áö´Â setAsText¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ getTags
¹Ýȯ°ª:
ÀÌ ÇÁ·ÎÆÛƼÀÇ ÅÂ±× Ã·À߸øµÈ °ª. ÀÌ ÇÁ·ÎÆÛƼ¸¦ ÅÂ±× Ã·À߸øµÈ °ª À¸·Î Çؼ­ Ç¥½ÃÇÒ ¼ö ¾ø´Â °æ¿ì´Â null

getCustomEditor

public Component  getCustomEditor()
PropertyEditor´Â ÇÁ·ÎÆÛƼġ¸¦ ÆíÁýÇÏ´Â ¿ÏÀüÇÑ Ä¿½ºÅÒ ÄÄÆÛ³ÍÆ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. PropertyEditor´Â ¿¡µðÅÍÀÇ ÄÄÆÛ³ÍÆ®¿Í Á¦ÈÞÇØ, PropertyChange À̺¥Æ®¸¦ Æ®¸®°ÅÀÇÇØ ÇÁ·ÎÆÛƼġÀÇ º¯°æÀ» ÅëÁöÇÕ´Ï´Ù.

getCustomEditor¸¦ È£ÃâÇÏ´Â °í·¹º§ÀÎ Äڵ忡¼­´Â ÄÄÆÛ³ÍÆ®¸¦ º¸´Ù Å« ÇÁ·ÎÆÛƼ ½ÃÆ®¿¡ Â¥³Ö°Å³ª µ¶ÀÚÀûÀÎ ´ÙÀ̾ó·Î±×¿¡ ¹èÄ¡Çϰųª ÇÒ ¼ö ÀÖ½À´Ï´Ù .

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ getCustomEditor
¹Ýȯ°ª:
»ç¿ëÀÚ°¡ ÇöÀçÀÇ ÇÁ·ÎÆÛƼġ¸¦ Á÷Á¢ ÆíÁýÇÒ ¼ö ÀÖµµ·Ï ÇÏ´Â java.awt.Component. Áö¿øµÇÁö ¾Ê´Â °æ¿ì´Â null

supportsCustomEditor

public boolean supportsCustomEditor()
propertyEditor°¡ Ä¿½ºÅÒ ¿¡µðÅ͸¦ Áö¿øÇÒ ¼ö ÀÖÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ supportsCustomEditor
¹Ýȯ°ª:
propertyEditor°¡ Ä¿½ºÅÒ ¿¡µðÅ͸¦ Áö¿øÇÒ ¼ö ÀÖ´Â °æ¿ì´Â true

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener  listener)
PropertyChange À̺¥Æ®ÀÇ ¸®½º³Ê¸¦ µî·ÏÇÕ´Ï´Ù. Ŭ·¡½º´Â °ªÀÌ °»½ÅµÉ ¶§¸¶´Ù PropertyChange Ä¡¸¦ ÆıâÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ addPropertyChangeListener
ÆĶó¹ÌÅÍ:
listener - PropertyChange À̺¥Æ®°¡ Æ®¸®°Å µÇ¾úÀ» ¶§¿¡ È£ÃâµÇ´Â °´Ã¼

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener  listener)
PropertyChange À̺¥Æ®ÀÇ ¸®½º³Ê¸¦ »èÁ¦ÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º PropertyEditor ³»ÀÇ removePropertyChangeListener
ÆĶó¹ÌÅÍ:
listener - »èÁ¦µÇ´Â PropertyChange ¸®½º³Ê

firePropertyChange

public void firePropertyChange()
°ü·Ã ¸®½º³Ê°¡ ¸ðµÎ »èÁ¦µÈ °ÍÀ» º¸°íÇÕ´Ï´Ù.


JavaTM 2 Platform
Standard Ed. 5.0

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