|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--javax.swing.ImageIcon
¾ÆÀÌÄÜÀ» À̹ÌÁö·ÎºÎÅÍ Ç¥Çö ÇÏ´Â Icon ÀÎÅÍÆäÀ̽ºÀÇ ±¸ÇöÀÔ´Ï´Ù. URL ¶Ç´Â ÆÄÀϸíÀ¸·ÎºÎÅÍ »ý¼ºµÇ´Â À̹ÌÁö°¡, ·Îµå »óŸ¦ °¨½ÃÇÏ´Â ¸Þµð¾ÆÆ®¶ôÄ«¸¦ »ç¿ëÇØ ÇÁ¸®·Îµå µË´Ï´Ù.
À̹ÌÁö ¾ÆÀÌÄÜÀÇ »ó¼¼ ¹× »ç¿ë¿¹´Â ¡¸The Java Tutorial¡¹ÀÇ ¡¸How to Use Icons¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
°æ°í:
ÀÌ Å¬·¡½ºÀÇ Á÷·ÄÈ ¿ÀºêÁ§Æ®´Â ÇâÈÄ ¸±¸®½º µÇ´Â Swing ¿ÍÀÇ È£È¯¼ºÀº ¾ø½À´Ï´Ù. ÇöÀç ¼Æ÷Æ®µÇ°í ÀÖ´Â Á÷·ÄÈ´Â ´Ü±â°£ÀÇ º¸°ü, ¶Ç´Â °°Àº ¹öÁ¯ÀÇ Swing °¡ °¡µ¿Çϰí ÀÖ´Â ¾îÇø®ÄÉÀ̼ǰ£ÀÇ RMI ¿¡ ÀûÀýÇϰí ÀÖ½À´Ï´Ù. 1.4 ·ÎºÎÅÍ´Â ¸ðµç JavaBeansTM ÀÇ Àå±â°£ÀÇ º¸°üÀÌ java.beans
ÆÐŰÁö·Î Ãß°¡ ¼Æ÷Æ®µÇ°í ÀÖ½À´Ï´Ù. XMLEncoder
¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
ÁßøµÈ Ŭ·¡½ºÀÇ °³¿ä | |
protected class |
ImageIcon.AccessibleImageIcon
ÀÌ Å¬·¡½º´Â ImageIcon Ŭ·¡½º¿ëÀÇ À¯Àú º¸Á¶ ±â´ÉÀÇ ¼Æ÷Æ®¸¦ ±¸ÇöÇϰí ÀÖ½À´Ï´Ù. |
ÇʵåÀÇ °³¿ä | |
protected static Component |
component
|
protected static MediaTracker |
tracker
|
»ý¼ºÀÚÀÇ °³¿ä | |
ImageIcon ()
ÃʱâȵǾî ÀÖÁö ¾ÊÀº À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (byte[] imageData)
¼Æ÷Æ®µÇ°í ÀÖ´Â GIF ³ª JPEG µîÀÇ, À̹ÌÁö Çü½ÄÀ» ÀúÀåÇϰí ÀÖ´Â À̹ÌÁö ÆÄÀϷκÎÅÍ ÀоÁø ¹ÙÀÌÆ® ¹è¿·ÎºÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (byte[] imageData,
String description)
¼Æ÷Æ®µÇ°í ÀÖ´Â GIF ³ª JPEG µîÀÇ, À̹ÌÁö Çü½ÄÀ» ÀúÀåÇϰí ÀÖ´Â À̹ÌÁö ÆÄÀϷκÎÅÍ ÀоÁø ¹ÙÀÌÆ® ¹è¿·ÎºÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (Image image)
À̹ÌÁö ¿ÀºêÁ§Æ®·ÎºÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (Image image,
String description)
À̹ÌÁö·ÎºÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (String filename)
ÁöÁ¤µÈ ÆÄÀϷκÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (String filename,
String description)
ÁöÁ¤µÈ ÆÄÀϷκÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (URL location)
ÁöÁ¤µÈ URL ·ÎºÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
|
ImageIcon (URL location,
String description)
ÁöÁ¤µÈ URL ·ÎºÎÅÍ À̹ÌÁö ¾ÆÀÌÄÜÀ» »ý¼ºÇÕ´Ï´Ù. |
¸Þ¼ÒµåÀÇ °³¿ä | |
AccessibleContext |
getAccessibleContext ()
ÀÌ ImageIcon ¿¡ °ü·ÃÁöÀ» ¼ö ÀÖ¾ú´ø AccessibleContext ¸¦ ÃëµæÇÕ´Ï´Ù. |
String |
getDescription ()
À̹ÌÁöÀÇ ¼³¸íÀ» ÃëµæÇÕ´Ï´Ù. |
int |
getIconHeight ()
¾ÆÀÌÄÜÀÇ ³ôÀ̸¦ ÃëµæÇÕ´Ï´Ù. |
int |
getIconWidth ()
¾ÆÀÌÄÜÀÇ ÆøÀ» ÃëµæÇÕ´Ï´Ù. |
Image |
getImage ()
¾ÆÀÌÄÜÀÇ Image ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getImageLoadStatus ()
À̹ÌÁö ·Îµå Á¶ÀÛ »óŸ¦ µ¹·ÁÁÝ´Ï´Ù. |
ImageObserver |
getImageObserver ()
À̹ÌÁöÀÇ À̹ÌÁö °¨½Ã ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù. |
protected void |
loadImage (Image image)
À̹ÌÁö¸¦ ·ÎµåÇØ, À̹ÌÁö°¡ ·Îµå µÇ¾úÀ» ¶§ ¸¶¼Å º¹±ÍÇÕ´Ï´Ù. |
void |
paintIcon (Component c,
Graphics g,
int x,
int y)
¾ÆÀÌÄÜÀ» paint ÇÕ´Ï´Ù. |
void |
setDescription (String description)
À̹ÌÁöÀÇ ¼³¸íÀ» ¼³Á¤ÇÕ´Ï´Ù. |
void |
setImage (Image image)
¾ÆÀÌÄÜ¿¡ ÀÇÇØ Ç¥½ÃµÇ´Â À̹ÌÁö¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setImageObserver (ImageObserver observer)
À̹ÌÁöÀÇ À̹ÌÁö °¨½Ã ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
String |
toString ()
ÀÌ À̹ÌÁöÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇöÀ» µ¹·ÁÁÝ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
ÇʵåÀÇ »ó¼¼ |
protected static final Component component
protected static final MediaTracker tracker
»ý¼ºÀÚÀÇ »ó¼¼ |
public ImageIcon(String filename, String description)
filename
- À̹ÌÁö¸¦ ÀúÀåÇÏ´Â ÆÄÀÏÀÇ À̸§description
- À̹ÌÁöÀÇ ÂªÀº ¼³¸í ÅØ½ºÆ®ImageIcon(String)
public ImageIcon(String filename)
new ImageIcon("images/myImage.gif")¼³¸íÀº
filename
ij¸¯ÅÍ ¶óÀο¡ Ãʱâȵ˴ϴÙ.
filename
- ÆÄÀÏ¸í ¶Ç´Â ÆÐ½º¸¦ ÁöÁ¤Çϴ ij¸¯ÅÍ ¶óÀÎgetDescription()
public ImageIcon(URL location, String description)
location
- À̹ÌÁöÀÇ URLdescription
- À̹ÌÁöÀÇ ÂªÀº ¼³¸í ÅØ½ºÆ®ImageIcon(String)
public ImageIcon(URL location)
location
- À̹ÌÁöÀÇ URLgetDescription()
public ImageIcon(Image image, String description)
image
- À̹ÌÁödescription
- À̹ÌÁöÀÇ ÂªÀº ¼³¸í ÅØ½ºÆ®public ImageIcon(Image image)
image
- À̹ÌÁögetDescription()
,
Image.getProperty(java.lang.String, java.awt.image.ImageObserver)
public ImageIcon(byte[] imageData, String description)
imageData
- AWT Toolkit ¿¡ ÀÇÇØ ¼Æ÷Æ®µÇ´Â GIF ³ª JPEG µîÀÇ À̹ÌÁö Çü½Ä¿¡ ÀÇÇÑ Çȼ¿ ¹è¿description
- À̹ÌÁöÀÇ ÂªÀº ¼³¸í ÅØ½ºÆ®Toolkit.createImage(java.lang.String)
public ImageIcon(byte[] imageData)
imageData
- AWT Toolkit ¿¡ ÀÇÇØ ¼Æ÷Æ®µÇ´Â GIF ³ª JPEG µîÀÇ À̹ÌÁö Çü½Ä¿¡ ÀÇÇÑ Çȼ¿ ¹è¿Toolkit.createImage(java.lang.String)
,
getDescription()
,
Image.getProperty(java.lang.String, java.awt.image.ImageObserver)
public ImageIcon()
¸Þ¼ÒµåÀÇ »ó¼¼ |
protected void loadImage(Image image)
image
- À̹ÌÁöpublic int getImageLoadStatus()
MediaTracker.ABORTED
,
MediaTracker.ERRORED
,
MediaTracker.COMPLETE
public Image getImage()
Image
¸¦ µ¹·ÁÁÝ´Ï´Ù.
ImageIcon
ÀÇ Image
¿ÀºêÁ§Æ®public void setImage(Image image)
image
- À̹ÌÁöpublic String getDescription()
public void setDescription(String description)
description
- À̹ÌÁöÀÇ ÂªÀº ¼³¸í ÅØ½ºÆ®public void paintIcon(Component c, Graphics g, int x, int y)
g
ÀÇ ÁÂÇ¥ °ø°£¿¡ ÀÖ´Â Á¡ (x
, y
)¿¡ Ç¥Çö µË´Ï´Ù. ÀÌ ¾ÆÀÌÄÜ¿¡ À̹ÌÁö °¨½Ã ¿ÀºêÁ§Æ®°¡ ¾ø´Â °æ¿ì, ÀÌ ¸Þ¼Òµå¿¡¼´Â °¨½Ã ¿ÀºêÁ§Æ®·Î¼ c
ÄÄÆÛ³ÍÆ®¸¦ »ç¿ëÇÕ´Ï´Ù.
Icon
³»ÀÇ paintIcon
c
- ÀÌ ¾ÆÀÌÄÜ¿¡ À̹ÌÁö ¿ÉÀú¹ö°¡ ¾ø´Â °æ¿ì¿¡ ¿ÉÀú¹ö·Î¼ »ç¿ëµÇ´Â ÄÄÆÛ³ÍÆ®g
- ±×·¡ÇȽº ¹®¸Æx
- ¾ÆÀÌÄÜÀÇ Á»󱸼®ÀÇ X ÁÂÇ¥y
- ¾ÆÀÌÄÜÀÇ Á»󱸼®ÀÇ Y ÁÂÇ¥public int getIconWidth()
Icon
³»ÀÇ getIconWidth
public int getIconHeight()
Icon
³»ÀÇ getIconHeight
public void setImageObserver(ImageObserver observer)
icon = new ImageIcon(...) button.setIcon(icon); icon.setImageObserver(button);
observer
- À̹ÌÁö °¨½Ã ¿ÀºêÁ§Æ®public ImageObserver getImageObserver()
public String toString()
Object
³»ÀÇ toString
public AccessibleContext getAccessibleContext()
Accessible
³»ÀÇ getAccessibleContext
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
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.