|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
| ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå | ||||||||||
java.lang.Object | +--java.awt.MediaTracker
MediaTracker Ŭ·¡½º´Â ¸î°³ÀÇ ¹Ìµð¾î ¿ÀºêÁ§Æ® »óŸ¦ °¨½ÃÇÏ´Â À¯Æ¿¸®Æ¼ Ŭ·¡½ºÀÔ´Ï´Ù. ¹Ìµð¾î ¿ÀºêÁ§Æ®¿¡´Â À̹ÌÁö¿Í ¿Àµð¿À Ŭ¸³ÀÌ Æ÷ÇԵ˴ϴÙ. ´Ù¸¸, ÇöÀç·Î¼´Â À̹ÌÁö¸¸ÀÌ ¼Æ÷Æ®µÇ°í ÀÖ½À´Ï´Ù.
¸Þµð¾ÆÆ®¶ôÄ«¸¦ »ç¿ëÇÏ·Á¸é , °¨½ÃÇÏ´Â À̹ÌÁö ¸¶´Ù MediaTracker ÀÇ ÀνºÅϽº¸¦ »ý¼ºÇÏ°í ³ª¼ addImage ¸¦ È£ÃâÇÕ´Ï´Ù. ¶Ç, °¢°¢ÀÇ À̹ÌÁö¿¡´Â °íÀ¯ÀÇ ½Äº°ÀÚ¸¦ ÇÒ´çÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. ÀÌ·¯ÇÑ ½Äº°ÀÚ´Â À̹ÌÁö¸¦ ²¨³»´Â ¿ì¼± ¼øÀ§¸¦ Á¦¾îÇÕ´Ï´Ù. ¶Ç, °³º°ÀûÀ¸·Î ´ë±âÇÒ ¼ö ÀÖ´Â À̹ÌÁöÀÇ ºÎºÐÁýÇÕÀ» ½Äº°Çϱâ À§Çؼµµ »ç¿ëµË´Ï´Ù. ÀúÀ§ÀÇ ID ¹øÈ£¸¦ °¡Áö´Â À̹ÌÁö´Â °íÀ§ÀÇ ID ¹øÈ£¸¦ °¡Áö´Â À̹ÌÁöº¸´Ù ¿ì¼±ÀûÀ¸·Î ·Îµå µË´Ï´Ù.
´ÙÀ½Àº ±× ¿¹ÀÔ´Ï´Ù.
import java.applet.Applet;
import java.awt.Color;
import java.awt.Image;
import java.awt.Graphics;
import java.awt.MediaTracker;
public class ImageBlaster extends Applet implements Runnable {
MediaTracker tracker;
Image bg;
Image anim[] = new Image[5];
int index;
Thread animator;
// Get the images for the background (id == 0)
// and the animation frames (id == 1)
// and add them to the MediaTracker
public void init() {
tracker = new MediaTracker(this);
bg = getImage(getDocumentBase(),
"images/background.gif");
tracker.addImage(bg, 0);
for (int i = 0; i < 5; i++) {
anim[i] = getImage(getDocumentBase(),
"images/anim"+i+". gif");
tracker.addImage(anim[i], 1);
}
}
// Start the animation thread.
public void start() {
animator = new Thread(this);
animator.start();
}
// Stop the animation thread.
public void stop() {
animator = null;
}
// Run the animation thread.
// First wait for the background image to fully load
// and paint. Then wait for all of the animation
// frames to finish loading. Finally, loop and
// increment the animation frame index.
public void run() {
try {
tracker.waitForID(0);
tracker.waitForID(1);
} catch (InterruptedException e) {
return;
}
Thread me = Thread.currentThread();
while (animator == me) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
break;
}
synchronized (this) {
index++;
if (index >= anim.length) {
index = 0;
}
}
repaint();
}
}
// The background image fills the frame so we
// don't need to clear the applet on repaints.
// Just call the paint method.
public void update(Graphics g) {
paint(g);
}
// Paint a large red rectangle if there are any errors
// loading the images. Otherwise always paint the
// background so that it appears incrementally as it
// is loading. Finally, only paint the current animation
// frame if all of the frames (id == 1) are done loading,
// so that we don't get partial animations.
public void paint(Graphics g) {
if ((tracker.statusAll(false) & MediaTracker.ERRORED) ! = 0) {
g.setColor(Color.red);
g.fillRect(0, 0, size(). width, size(). height);
return;
}
g.drawImage(bg, 0, 0, this);
if (tracker.statusID(1, false) == MediaTracker.COMPLETE) {
g.drawImage(anim[index], 10, 10, this);
}
}
}
| ÇʵåÀÇ °³¿ä | |
static int |
ABORTED
¹Ìµð¾îÀÇ ´Ù¿î·Îµå°¡ ÁßÁöµÈ °ÍÀ» ³ªÅ¸³»´Â Ç÷¡±×ÀÔ´Ï´Ù. |
static int |
COMPLETE
¹Ìµð¾îÀÇ ´Ù¿î·Îµå°¡ Á¤»óÀûÀ¸·Î Á¾·áÇÑ °ÍÀ» ³ªÅ¸³»´Â Ç÷¡±×ÀÔ´Ï´Ù. |
static int |
ERRORED
¹Ìµð¾îÀÇ ´Ù¿î·Îµå·Î ¿¡·¯°¡ ÀÖ´ø °ÍÀ» ³ªÅ¸³»´Â Ç÷¡±×ÀÔ´Ï´Ù. |
static int |
LOADING
¹Ìµð¾î°¡ ·ÎµåµÇ°í ÀÖ´Â °ÍÀ» ³ªÅ¸³»´Â Ç÷¡±×ÀÔ´Ï´Ù. |
| »ý¼ºÀÚÀÇ °³¿ä | |
MediaTracker (Component comp)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ À̹ÌÁö¸¦ °¨½ÃÇÏ´Â ¸Þµð¾ÆÆ®¶ôÄ«¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
|
| ¸Þ¼ÒµåÀÇ °³¿ä | |
void |
addImage (Image image,
int id)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ°í ÀÖ´Â ¸®½ºÆ®¿¡ À̹ÌÁö¸¦ Ãß°¡ÇÕ´Ï´Ù. |
void |
addImage (Image image,
int id,
int w,
int h)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ°í ÀÖ´Â ¸®½ºÆ®¿¡, ½½Ä¶¸µ µÈ À̹ÌÁö¸¦ Ãß°¡ÇÕ´Ï´Ù. |
boolean |
checkAll ()
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½Ã ¶°³¯ ¼ö ÀÖ¾î ¸ðµç À̹ÌÁö°¡, ·Îµå¸¦ ¿Ï·áÇß´ÂÁö ¾î¶°Çß´ÂÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
boolean |
checkAll (boolean load)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½Ã ¶°³¯ ¼ö ÀÖ¾î ¸ðµç À̹ÌÁö°¡, ·Îµå¸¦ ¿Ï·áÇß´ÂÁö ¾î¶°Çß´ÂÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
boolean |
checkID (int id)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ÁöÁ¤µÈ ½Äº°ÀÚ·Î ÅÂ±× ºÙÀÌ°í µÈ ¸ðµç À̹ÌÁö°¡, ·Îµå¸¦ ¿Ï·áÇß´ÂÁö ¾î¶°Çß´ÂÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
boolean |
checkID (int id,
boolean load)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ÁöÁ¤µÈ ½Äº°ÀÚ·Î ÅÂ±× ºÙÀÌ°í µÈ ¸ðµç À̹ÌÁö°¡, ·Îµå¸¦ ¿Ï·áÇß´ÂÁö ¾î¶°Çß´ÂÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
Object [] |
getErrorsAny ()
¿¡·¯°¡ ÀÖ´ø ¸ðµç ¹Ìµð¾îÀÇ ¸®½ºÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Object [] |
getErrorsID (int id)
ÁöÁ¤µÈ ID ¸¦ °¡Áö´Â ¹Ìµð¾îÁß ¿¡·¯°¡ µÈ °ÍÀÇ ¸®½ºÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù. |
boolean |
isErrorAny ()
¸ðµç À̹ÌÁöÀÇ ¿¡·¯ »óŸ¦ Á¶»çÇÕ´Ï´Ù. |
boolean |
isErrorID (int id)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ÁöÁ¤µÈ ½Äº°ÀÚ¸¦ °¡Áö´Â ¸ðµç À̹ÌÁöÀÇ ¿¡·¯ »óŸ¦ Á¶»çÇÕ´Ï´Ù. |
void |
removeImage (Image image)
ÁöÁ¤µÈ À̹ÌÁö¸¦ ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù. |
void |
removeImage (Image image,
int id)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«ÀÇ ÁöÁ¤µÈ °¨½Ã ID ·ÎºÎÅÍ ÁöÁ¤µÈ À̹ÌÁö¸¦ »èÁ¦ÇÕ´Ï´Ù. |
void |
removeImage (Image image,
int id,
int width,
int height)
ÁöÁ¤µÈ Æø, ³ôÀÌ, ID ¸¦ °¡Áö´Â ÁöÁ¤µÈ À̹ÌÁö¸¦ ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù. |
int |
statusAll (boolean load)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ¸ðµç ¹Ìµð¾î »óÅÂÀÇ ºñÆ® ´ÜÀ§ÀÇ³í¸®ÇÕÀ» °è»êÇØ µ¹·ÁÁÝ´Ï´Ù. |
int |
statusID (int id,
boolean load)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ÁöÁ¤µÈ ½Äº°ÀÚ¸¦ °¡Áö´Â ¸ðµç ¹Ìµð¾î »óÅÂÀÇ ºñÆ® ´ÜÀ§ÀÇ³í¸®ÇÕÀ» °è»êÇØ µ¹·ÁÁÝ´Ï´Ù. |
void |
waitForAll ()
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½Ã ¶°³¯ ¼ö ÀÖ¾î ¸ðµç À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù. |
boolean |
waitForAll (long ms)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ¸ðµç À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù. |
void |
waitForID (int id)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ÁöÁ¤µÈ ½Äº°ÀÚ¸¦ °¡Áö´Â ¸ðµç À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù. |
boolean |
waitForID (int id,
long ms)
ÀÌ ¸Þµð¾ÆÆ®¶ôÄ«¿¡ ÀÇÇØ °¨½ÃµÇ´Â ÁöÁ¤µÈ ½Äº°ÀÚ¸¦ °¡Áö´Â ¸ðµç À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù. |
| Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| ÇʵåÀÇ »ó¼¼ |
public static final int LOADING
statusAll(boolean) ,
statusID(int, boolean) ,
Á¤¼ö ÇʵåÄ¡ public static final int ABORTED
statusAll(boolean) ,
statusID(int, boolean) ,
Á¤¼ö ÇʵåÄ¡ public static final int ERRORED
statusAll(boolean) ,
statusID(int, boolean) ,
Á¤¼ö ÇʵåÄ¡ public static final int COMPLETE
statusAll(boolean) ,
statusID(int, boolean) ,
Á¤¼ö ÇʵåÄ¡ | »ý¼ºÀÚÀÇ »ó¼¼ |
public MediaTracker(Component comp)
comp - À̹ÌÁö°¡ ÃÖÁ¾ÀûÀ¸·Î Ç¥Çö µÇ´Â ÄÄÆÛ³ÍÆ®| ¸Þ¼ÒµåÀÇ »ó¼¼ |
public void addImage(Image image,
int id)
image - °¨½ÃµÇ´Â À̹ÌÁöid - ÀÌ À̹ÌÁö¸¦ °¨½ÃÇϱâ À§Çؼ »ç¿ëÇÏ´Â ½Äº°ÀÚ
public void addImage(Image image,
int id,
int w,
int h)
image - °¨½ÃµÇ´Â À̹ÌÁöid - ÀÌ À̹ÌÁö¸¦ °¨½ÃÇϱâ À§Çؼ »ç¿ëÇÏ´Â ½Äº°ÀÚw - À̹ÌÁö°¡ Ç¥Çö µÇ´Â areaÀÇ Æøh - À̹ÌÁö°¡ Ç¥Çö µÇ´Â areaÀÇ ³ôÀÌpublic boolean checkAll()
ÀÌ ¸Þ¼Òµå´Â À̹ÌÁö°¡ ¾ÆÁ÷ ·Îµå¾ÈÀÌ ¾Æ´Ï¸é, ±×·¯ÇÑ ·Îµå¸¦ °³½ÃÇÏÁö ¾Ê½À´Ï´Ù.
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¶Ç´Â isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falsecheckAll(boolean) ,
checkID(int) ,
isErrorAny() ,
isErrorID(int) public boolean checkAll(boolean load)
load Ç÷¡±×ÀÇ °ªÀÌ true ÀÇ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ¾ÆÁ÷ ·Îµå¾ÈÀÌ ¾Æ´Ñ À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù.
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¿Í isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
load - true ÀÇ °æ¿ì, ¾ÆÁ÷ ·Îµå°¡ °³½ÃµÇ¾î ÀÖÁö ¾ÊÀº À̹ÌÁö°¡ ÀÖÀ¸¸é ·Îµå¸¦ °³½ÃÇÑ´Ù
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falsecheckID(int) ,
checkAll() ,
isErrorAny() ,
isErrorID(int) public boolean isErrorAny()
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falseisErrorID(int) ,
getErrorsAny() public Object [] getErrorsAny()
nullisErrorAny() ,
getErrorsID(int)
public void waitForAll()
throws InterruptedException
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¶Ç´Â isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
InterruptedException - º°ÀÇ thread°¡ ÀÌ thread¿¡ ³¢¾îµé¾úÀ» °æ¿ìwaitForID(int) ,
waitForAll(long) ,
isErrorAny() ,
isErrorID(int)
public boolean waitForAll(long ms)
throws InterruptedException
ms Àμö¿¡ ÀÇÇØ ¹Ð¸® ¼¼ÄÁµå ´ÜÀ§·Î ÁöÁ¤µÈ ½Ã°£ÀÌ °æ°úÇÒ ¶§±îÁö ´ë±âÇÕ´Ï´Ù.
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¶Ç´Â isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
ms - ·Îµå°¡ ¿Ï·áÇÒ ¶§±îÁö ´ë±âÇÏ´Â ¹Ð¸® ¼¼ÄÁµå¼ö
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
InterruptedException - º°ÀÇ thread°¡ ÀÌ thread¿¡ ³¢¾îµé¾úÀ» °æ¿ìwaitForID(int) ,
waitForAll(long) ,
isErrorAny() ,
isErrorID(int) public int statusAll(boolean load)
MediaTracker Ŭ·¡½º¿¡¼ Á¤ÀǵǴ Ç÷¡±×¿¡´Â LOADING,ABORTED,ERRORED, ¹× COMPLETE °¡ ÀÖ½À´Ï´Ù. ·Îµå¸¦ °³½ÃÇϰí ÀÖÁö ¾Ê´Â À̹ÌÁö »óÅ´ Á¦·Î·Î ³ªÅ¸³»Áý´Ï´Ù.
load ÀÇ °ªÀÌ true ÀÇ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ¾ÆÁ÷ ·Îµå°¡ °³½ÃµÇ¾î ÀÖÁö ¾ÊÀº À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù.
load - true ÀÇ °æ¿ì, ¾ÆÁ÷ ·Îµå°¡ °³½ÃµÇ¾î ÀÖÁö ¾ÊÀº À̹ÌÁö°¡ ÀÖÀ¸¸é ·Îµå¸¦ °³½ÃÇÑ´Ù
statusID(int, boolean) ,
LOADING ,
ABORTED ,
ERRORED ,
COMPLETE public boolean checkID(int id)
ÀÌ ¸Þ¼Òµå´Â À̹ÌÁö°¡ ¾ÆÁ÷ ·Îµå¾ÈÀÌ ¾Æ´Ï¸é, ±×·¯ÇÑ ·Îµå¸¦ °³½ÃÇÏÁö ¾Ê½À´Ï´Ù.
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¶Ç´Â isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚ
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falsecheckID(int, boolean) ,
checkAll() ,
isErrorAny() ,
isErrorID(int)
public boolean checkID(int id,
boolean load)
load Ç÷¡±×ÀÇ °ªÀÌ true ÀÇ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ¾ÆÁ÷ ·Îµå¾ÈÀÌ ¾Æ´Ñ À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù.
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¶Ç´Â isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚload - true ÀÇ °æ¿ì, ¾ÆÁ÷ ·Îµå°¡ °³½ÃµÇ¾î ÀÖÁö ¾ÊÀº À̹ÌÁö°¡ ÀÖÀ¸¸é ·Îµå¸¦ °³½ÃÇÑ´Ù
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falsecheckID(int, boolean) ,
checkAll() ,
isErrorAny() ,
isErrorID(int) public boolean isErrorID(int id)
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚ
true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falseisErrorAny() ,
getErrorsID(int) public Object [] getErrorsID(int id)
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚ
nullisErrorID(int) ,
isErrorAny() ,
getErrorsAny()
public void waitForID(int id)
throws InterruptedException
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. isErrorAny ¿Í isErrorID ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚ
InterruptedException - º°ÀÇ thread°¡ ÀÌ thread¿¡ ³¢¾îµé¾úÀ» °æ¿ìwaitForAll() ,
isErrorAny() ,
isErrorID(int)
public boolean waitForID(int id,
long ms)
throws InterruptedException
ms Àμö¿¡ ÀÇÇØ ¹Ð¸® ¼¼ÄÁµå ´ÜÀ§·Î ÁöÁ¤ÇÑ ½Ã°£ÀÌ °æ°úÇÒ ¶§±îÁö ´ë±âÇÕ´Ï´Ù.
À̹ÌÁöÀÇ ·Îµå ¶Ç´Â ½½Ä¶¸µÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇϸé(ÀÚ), ±× À̹ÌÁöÀÇ ·Îµå´Â ¿Ï·áÇß´Ù°í º¸¿©Áý´Ï´Ù. statusID,isErrorID, ¹× isErrorAny ¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ¿¡·¯¸¦ Á¶»çÇÒ ¼ö ÀÖ½À´Ï´Ù.
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚms - ·ÎµåÀÇ ¿Ï·á¸¦ ´ë±âÇÏ´Â ¹Ð¸® ¼¼ÄÁµå ´ÜÀ§ÀÇ ½Ã°£
InterruptedException - º°ÀÇ thread°¡ ÀÌ thread¿¡ ³¢¾îµé¾úÀ» °æ¿ìwaitForAll() ,
waitForID(int) ,
statusID(int, boolean) ,
isErrorAny() ,
isErrorID(int)
public int statusID(int id,
boolean load)
MediaTracker Ŭ·¡½º¿¡¼ Á¤ÀǵǴ Ç÷¡±×¿¡´Â LOADING,ABORTED,ERRORED, ¹× COMPLETE °¡ ÀÖ½À´Ï´Ù. ·Îµå¸¦ °³½ÃÇϰí ÀÖÁö ¾Ê´Â À̹ÌÁö »óÅ´ Á¦·Î·Î ³ªÅ¸³»Áý´Ï´Ù.
load ÀÇ °ªÀÌ true ÀÇ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ¾ÆÁ÷ ·Îµå°¡ °³½ÃµÇ¾î ÀÖÁö ¾ÊÀº À̹ÌÁöÀÇ ·Îµå¸¦ °³½ÃÇÕ´Ï´Ù.
id - Á¶»çÇÏ´Â ´ë»óÀÌ µÇ´Â À̹ÌÁöÀÇ ½Äº°ÀÚload - true ÀÇ °æ¿ì, ¾ÆÁ÷ ·Îµå°¡ °³½ÃµÇ¾î ÀÖÁö ¾ÊÀº À̹ÌÁö°¡ ÀÖÀ¸¸é ·Îµå¸¦ °³½ÃÇÑ´Ù
statusAll(boolean) ,
LOADING ,
ABORTED ,
ERRORED ,
COMPLETE public void removeImage(Image image)
image - »èÁ¦µÇ´Â À̹ÌÁöremoveImage(java.awt.Image, int) ,
removeImage(java.awt.Image, int, int, int)
public void removeImage(Image image,
int id)
Image ÀÇ ¸ðµç ÀνºÅϽº´Â ½ºÄÉÀÏ (¿Í)´Â °ü°è¾ø´Â °ÍÀ¸·Î »èÁ¦µË´Ï´Ù.
image - »èÁ¦µÇ´Â À̹ÌÁöid - À̹ÌÁöÀÇ »èÁ¦¿øÀÇ °¨½Ã IDremoveImage(java.awt.Image) ,
removeImage(java.awt.Image, int, int, int)
public void removeImage(Image image,
int id,
int width,
int height)
image - »èÁ¦µÇ´Â À̹ÌÁöid - À̹ÌÁöÀÇ »èÁ¦¿øÀÇ °¨½Ã IDwidth - »èÁ¦ÇÏ´Â Æø (½½Ä¶¸µµÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â -1)height - »èÁ¦ÇÏ´Â ³ôÀÌ (½½Ä¶¸µµÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â -1)removeImage(java.awt.Image) ,
removeImage(java.awt.Image, int)
|
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.