JavaTM 2 Platform
Standard Ed. 5.0

javax.swing
Ŭ·¡½º SwingUtilities

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.swing.SwingUtilities
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
SwingConstants

public class SwingUtilities
extends Object
implements SwingConstants

Swing À¯Æ¿¸®Æ¼ ¸Þ¼­µåÀÇ Ä÷º¼ÇÀÔ´Ï´Ù.


ÇÊµå °³¿ä
 
ÀÎÅÍÆäÀ̽º javax.swing. SwingConstants ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
¸Þ¼­µå °³¿ä
static Rectangle calculateInnerArea (JComponent  c, Rectangle  r)
          r ³»¿¡¼­ ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ³»ºÎ ÆäÀÎÆ® ¿µ¿ªÀÇ À§Ä¡¿Í »çÀÌÁ Æ÷ÇÔÇØ, r¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Rectangle [] computeDifference (Rectangle  rectA, Rectangle  rectB)
          rectA ³»¿¡¼­ rectB¿Í ¿À¹ö·¦ ÇÏÁö ¾Ê´Â ¿µ¿ªÀ» Ç¥ÇöÇÏ´Â ±¸ÇüÀÇ ¹è¿­À» µ¹·ÁÁִµ¥ Æí¸®ÇÕ´Ï´Ù.
static Rectangle computeIntersection (int x, int y, int width, int height, Rectangle  dest)
          »õ·Î¿î ±¸ÇüÀ» ÇÒ´çÇÏÁö ¾Ê°í, 2°³ÀÇ ±¸ÇüÀÇ °øÅë ºÎºÐÀ» °è»êÇϴµ¥ Æí¸®ÇÕ´Ï´Ù.
static int computeStringWidth (FontMetrics  fm, String  str)
          ÁöÁ¤µÈ ¸ÞÆ®¸¯½º (»çÀÌÁî)¸¦ °¡Áö´Â ÆùÆ®¸¦ »ç¿ëÇØ Ä³¸¯ÅÍ ¶óÀÎÀÇ ³ÐÀ̸¦ °è»êÇÕ´Ï´Ù.
static Rectangle computeUnion (int x, int y, int width, int height, Rectangle  dest)
          »õ·Î¿î ±¸ÇüÀ» ÇÒ´çÇÏÁö ¸»°í 2°³ÀÇ ±¸ÇüÀÇ °áÇÕ ºÎºÐÀ» »êÃâÇÏ´Â °£ÀÌ ¸Þ¼­µåÀÔ´Ï´Ù.
static MouseEvent convertMouseEvent (Component  source, MouseEvent  sourceEvent, Component  destination)
          ±× x¿Í y ¸â¹ö°¡ destination ÁÂÇ¥ ü°è¿¡ º¯È¯ ³¡³­ °æ¿ì¸¦ Á¦¿ÜÇØ, sourceEvent¿Í °°Àº MouseEvent¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Point convertPoint (Component  source, int x, int y, Component  destination)
          source ÁÂÇ¥ ü°èÀÇ Á¡ (x, y)À» destination ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù.
static Point convertPoint (Component  source, Point  aPoint, Component  destination)
          source ÁÂÇ¥ ü°èÀÇ aPoint¸¦ destination ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù.
static void convertPointFromScreen (Point  p, Component  c)
          Æ÷ÀÎÆ®¸¦ È­¸é ÁÂÇ¥·ÎºÎÅÍ ÄÄÆÛ³ÍÆ®ÀÇ ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù.
static void convertPointToScreen (Point  p, Component  c)
          Æ÷ÀÎÆ®¸¦ ÄÄÆÛ³ÍÆ®ÀÇ ÁÂÇ¥ ü°è·ÎºÎÅÍ È­¸é ÁÂÇ¥·Î º¯È¯ÇÕ´Ï´Ù.
static Rectangle convertRectangle (Component  source, Rectangle  aRectangle, Component  destination)
          source ÁÂÇ¥ ü°èÀÇ aRectangle¸¦ destination ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù.
static Component findFocusOwner (Component  c)
          ÃßõÇÏÁö ¾Ê½À´Ï´Ù.  ¹öÀü 1.4 ÀÌÈÄ, KeyboardFocusManager.getFocusOwner()·Î ¿Å°ÜÁ³½À´Ï´Ù.
static Accessible getAccessibleAt (Component  c, Point  p)
          ·ÎÄà ÁÂÇ¥ÀÇ Point¿¡ Accessible ÀÚ½ÄÀÌ º¸°ü À¯ÁöµÇ°í ÀÖ´Â °æ¿ì´Â ±×°ÍÀ» ¸®ÅÏÇÕ´Ï´Ù.
static Accessible getAccessibleChild (Component  c, int i)
          °´Ã¼ÀÇ n ¹ø°ÀÇ Accessible ÀÚ½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù.
static int getAccessibleChildrenCount (Component  c)
          °´Ã¼³»ÀÇ »ç¿ëÀÚ º¸Á¶ ±â´ÉÀÇÀÚ½Ä ÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static int getAccessibleIndexInParent (Component  c)
          »ç¿ëÀÚ º¸Á¶ÀÇ ºÎ¸ð¿¡¼­ÀÇ ÀÌ °´Ã¼ÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static AccessibleStateSet getAccessibleStateSet (Component  c)
          ÀÌ °´Ã¼ »óŸ¦ ÃëµæÇÕ´Ï´Ù.
static Container getAncestorNamed (String  name, Component  comp)
          ÄÄÆÛ³ÍÆ® °èÃþ¿¡¼­ comp »óÀ§¸¦ °Ë»öÇϱâ À§ÇÑ °£ÀÌ ¸Þ¼­µåÀ̸ç, ¹ß°ßµÈ name ÃÖÃÊÀÇ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Container getAncestorOfClass (Class <? > c, Component  comp)
          ÄÄÆÛ³ÍÆ® °èÃþ¿¡¼­ comp »óÀ§¸¦ °Ë»öÇϱâ À§ÇÑ °£ÀÌ ¸Þ¼­µåÀ̸ç, ¹ß°ßµÈ c Ŭ·¡½ºÀÇ ÃÖÃÊÀÇ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Component getDeepestComponentAt (Component  parent, int x, int y)
          À§Ä¡ x, y¸¦ ³»Æ÷ ÇÏ´Â parent¸¦ ºÎ¸ð·Î¼­ °¡Áö´Â ÃÖÇÏÁ¤µµÀÇ °¡½Ã ÄÄÆÛ³ÍÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Rectangle getLocalBounds (Component  aComponent)
          aComponent ÄÄÆÛ³ÍÆ®ÀÇ ±¸Çü (0,0, bounds.width, bounds.height)À» ¸®ÅÏÇÕ´Ï´Ù.
static Component getRoot (Component  c)
          ÇöÀçÀÇ ÄÄÆÛ³ÍÆ® Æ®¸®ÀÇ ·çÆ® ÄÄÆÛ³ÍÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static JRootPane getRootPane (Component  c)
          c°¡ ÇÏÀ§ JRootPane °´Ã¼ÀÇ °æ¿ì´Â °Ô´Ù°¡ À§ JRootPane °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static ActionMap getUIActionMap (JComponent  component)
          UI°¡ component·Î ÁöÁ¤ÇÑ ActionMap¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static InputMap getUIInputMap (JComponent  component, int condition)
          UI°¡ component condition·Î ÁöÁ¤ÇÑ InputMap¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static Window getWindowAncestor (Component  c)
          c ÃÖÃÊÀÇ »óÀ§ Window¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static void invokeAndWait (Runnable  doRun)
          doRun.run()¸¦, AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå·Î ºñµ¿±âÀûÀ¸·Î ½ÇÇà½Ãŵ´Ï´Ù.
static void invokeLater (Runnable  doRun)
          doRun.run()¸¦, AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå·Î ºñµ¿±âÀûÀ¸·Î ½ÇÇà½Ãŵ´Ï´Ù.
static boolean isDescendingFrom (Component  a, Component  b)
          ÄÄÆÛ³ÍÆ® a°¡ ÄÄÆÛ³ÍÆ® b ÇÏÀ§¿¡ ÀÖ´Â °æ¿ì, true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static boolean isEventDispatchThread ()
          ÇöÀçÀÇ thread°¡ AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µåÀÇ °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static boolean isLeftMouseButton (MouseEvent  anEvent)
          ¸¶¿ì½º À̺¥Æ®°¡ ¿ÞÂÊ mouse button¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static boolean isMiddleMouseButton (MouseEvent  anEvent)
          ¸¶¿ì½º À̺¥Æ®°¡ Áß¾ÓÀÇ mouse button¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static boolean isRectangleContainingRectangle (Rectangle  a, Rectangle  b)
          a°¡ b¸¦ º¸°ü À¯ÁöÇÏ´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static boolean isRightMouseButton (MouseEvent  anEvent)
          ¸¶¿ì½º À̺¥Æ®°¡ ¿À¸¥ÂÊ mouse button¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
static String layoutCompoundLabel (FontMetrics  fm, String  text, Icon  icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle  viewR, Rectangle  iconR, Rectangle  textR, int textIconGap)
          ¾ÆÀÌÄÜÀÇ ±âÁ¡ À§Ä¡, ÅؽºÆ®ÀÇ baselineÀÇ ±âÁ¡ À§Ä¡ ¹× °¡´ÉÇϸé Ŭ¸³ ÇÑ ¹öÀüÀÇ º¹ÇÕ ¶óº§ ij¸¯ÅÍ ¶óÀÎÀ» °è»êÇØ ¸®ÅÏÇÕ´Ï´Ù.
static String layoutCompoundLabel (JComponent  c, FontMetrics  fm, String  text, Icon  icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle  viewR, Rectangle  iconR, Rectangle  textR, int textIconGap)
          ¾ÆÀÌÄÜÀÇ ±âÁ¡ À§Ä¡, ÅؽºÆ®ÀÇ baselineÀÇ ±âÁ¡ À§Ä¡ ¹× °¡´ÉÇϸé Ŭ¸³ ÇÑ ¹öÀüÀÇ º¹ÇÕ ¶óº§ ij¸¯ÅÍ ¶óÀÎÀ» °è»êÇØ ¸®ÅÏÇÕ´Ï´Ù.
static boolean notifyAction (Action  action, KeyStroke  ks, KeyEvent  event, Object  sender, int modifiers)
          action°¡ »ç¿ë °¡´ÉÇØ, ÇÑÆí nullÀÌ ¾Æ´Ñ °æ¿ì, action actionPerformed¸¦ È£ÃâÇÕ´Ï´Ù.
static void paintComponent (Graphics  g, Component  c, Container  p, int x, int y, int w, int h)
          ±¸ÇüÀÇ Á»󱸼® ¹× »çÀÌÁ ÁöÁ¤ÇØ, ÁöÁ¤µÈ ±¸Çü³»ÀÇ ÀÓÀÇÀÇ ±×·¡ÇÈ g·Î ÄÄÆÛ³ÍÆ® c¸¦ ÆäÀÎÆ® ÇÕ´Ï´Ù.
static void paintComponent (Graphics  g, Component  c, Container  p, Rectangle  r)
          Rectangle °´Ã¼¸¦ ÁöÁ¤ÇØ, ÁöÁ¤µÈ ±¸Çü³»ÀÇ ÀÓÀÇÀÇ ±×·¡ÇÈ g·Î ÄÄÆÛ³ÍÆ® c¸¦ ÆäÀÎÆ® ÇÕ´Ï´Ù.
static boolean processKeyBindings (KeyEvent  event)
          event¿¡ °ü·ÃµÈ Component Å° ¹ÙÀεùÀ» ó¸®ÇÕ´Ï´Ù.
static void replaceUIActionMap (JComponent  component, ActionMap  uiActionMap)
          component UI ActionMap¸¦ uiActionMap·Î º¯°æÇÏ´Â °£ÀÌ ¸Þ¼­µåÀÔ´Ï´Ù.
static void replaceUIInputMap (JComponent  component, int type, InputMap  uiInputMap)
          component UI InputMap¸¦ uiInputMap·Î º¯°æÇÏ´Â °£ÀÌ ¸Þ¼­µåÀÔ´Ï´Ù.
static void updateComponentTreeUI (Component  c)
          ´Ü¼øÇÑ Look & Feel º¯°æÀ¸·Î Æ®¸®³»ÀÇ °¢ ³ëµå¿¡ updateUI() 󸮸¦ ½Ç½ÃÇÏ´Â °Í, Áï ÇöÀçÀÇ Look & Feel ·Î ±× UI ÇÁ·ÎÆÛƼ¸¦ ÃʱâÈ­ÇÏ´Â °ÍÀ» ¿ä±¸ÇÕ´Ï´Ù.
static Window windowForComponent (Component  c)
          c ÃÖÃÊÀÇ »óÀ§ Window¸¦ ¸®ÅÏÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

isRectangleContainingRectangle

public static final boolean isRectangleContainingRectangle(Rectangle  a,
                                                           Rectangle  b)
a°¡ b¸¦ º¸°ü À¯ÁöÇÏ´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.


getLocalBounds

public static Rectangle  getLocalBounds(Component  aComponent)
aComponent ÄÄÆÛ³ÍÆ®ÀÇ ±¸Çü (0,0, bounds.width, bounds.height)À» ¸®ÅÏÇÕ´Ï´Ù.


getWindowAncestor

public static Window  getWindowAncestor(Component  c)
c ÃÖÃÊÀÇ »óÀ§ Window¸¦ ¸®ÅÏÇÕ´Ï´Ù. c°¡ Window ³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
c - »óÀ§ Window¸¦ ¾ò´Â Component
¹Ýȯ°ª:
c ÃÖÃÊÀÇ »óÀ§ Window. c°¡ Window ³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â null

convertPoint

public static Point  convertPoint(Component  source,
                                 Point  aPoint,
                                 Component  destination)
source ÁÂÇ¥ ü°èÀÇ aPoint¸¦ destination ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù. source°¡ nullÀÎ °æ¿ì, aPoint´Â destination ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ ÀÖ´Â °Í°ú »óÁ¤µË´Ï´Ù. destination°¡ nullÀÎ °æ¿ì, aPoint´Â source ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ º¯È¯µË´Ï´Ù. source¿Í destination°¡ ¾î´À ÂÊ°úµµ nullÀÎ °æ¿ì´Â º¯È¯ÇÏÁö ¾Ê°í aPoint¸¦ ¸®ÅÏÇÕ´Ï´Ù.


convertPoint

public static Point  convertPoint(Component  source,
                                 int x,
                                 int y,
                                 Component  destination)
source ÁÂÇ¥ ü°èÀÇ Á¡ (x, y)À» destination ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù. source°¡ nullÀÎ °æ¿ì, (x, y)´Â destination ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ ÀÖ´Â °Í°ú »óÁ¤µË´Ï´Ù. destination°¡ nullÀÎ °æ¿ì, (x, y)´Â source ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ º¯È¯µË´Ï´Ù. source¿Í destination°¡ ¾î´À ÂÊ°úµµ nullÀÎ °æ¿ì´Â º¯È¯ÇÏÁö ¾Ê°í (x, y)¸¦ ¸®ÅÏÇÕ´Ï´Ù.


convertRectangle

public static Rectangle  convertRectangle(Component  source,
                                         Rectangle  aRectangle,
                                         Component  destination)
source ÁÂÇ¥ ü°èÀÇ aRectangle¸¦ destination ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù. source°¡ nullÀÎ °æ¿ì, aRectangle´Â destination ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ ÀÖ´Â °Í°ú »óÁ¤µË´Ï´Ù. destination°¡ nullÀÎ °æ¿ì, aRectangle´Â source ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ º¯È¯µË´Ï´Ù. source¿Í destination°¡ ¾î´À ÂÊ°úµµ nullÀÎ °æ¿ì´Â º¯È¯ÇÏÁö ¾Ê°í aRectangle¸¦ ¸®ÅÏÇÕ´Ï´Ù.


getAncestorOfClass

public static Container  getAncestorOfClass(Class <? > c,
                                           Component  comp)
ÄÄÆÛ³ÍÆ® °èÃþ¿¡¼­ comp »óÀ§¸¦ °Ë»öÇϱâ À§ÇÑ °£ÀÌ ¸Þ¼­µåÀ̸ç, ¹ß°ßµÈ c Ŭ·¡½ºÀÇ ÃÖÃÊÀÇ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù. c Ŭ·¡½º°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.


getAncestorNamed

public static Container  getAncestorNamed(String  name,
                                         Component  comp)
ÄÄÆÛ³ÍÆ® °èÃþ¿¡¼­ comp »óÀ§¸¦ °Ë»öÇϱâ À§ÇÑ °£ÀÌ ¸Þ¼­µåÀ̸ç, ¹ß°ßµÈ name ÃÖÃÊÀÇ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù. name°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.


getDeepestComponentAt

public static Component  getDeepestComponentAt(Component  parent,
                                              int x,
                                              int y)
À§Ä¡ x, y¸¦ ³»Æ÷ ÇÏ´Â parent¸¦ ºÎ¸ð·Î¼­ °¡Áö´Â ÃÖÇÏÁ¤µµÀÇ °¡½Ã ÄÄÆÛ³ÍÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. parentÀÌ ÁöÁ¤µÈ À§Ä¡¸¦ ³»Æ÷ ÇÏ°í ÀÖÁö ¾Ê´Â °æ¿ì´Â nullÀÌ ¸®Åϵ˴ϴ٠. parentÀÌ ÄÁÅ×À̳ʰ¡ ¾Æ´Ñ °æ¿ì, ȤÀº parent °¡½ÃÀÇ ÀÚ½ÄÀÌ ¾î´À °Íµµ ÁöÁ¤µÈ À§Ä¡¸¦ ³»Æ÷ ÇÏ°í ÀÖÁö ¾Ê´Â °æ¿ì´Â parentÀÌ ¸®Åϵ˴ϴ٠.

ÆĶó¹ÌÅÍ:
parent - °Ë»öÀ» °³½ÃÇÏ´Â ·çÆ® ÄÄÆÛ³ÍÆ®
x - x Ÿ°Ù À§Ä¡
y - y Ÿ°Ù À§Ä¡

convertMouseEvent

public static MouseEvent  convertMouseEvent(Component  source,
                                           MouseEvent  sourceEvent,
                                           Component  destination)
±× x¿Í y ¸â¹ö°¡ destination ÁÂÇ¥ ü°è¿¡ º¯È¯ ³¡³­ °æ¿ì¸¦ Á¦¿ÜÇØ, sourceEvent¿Í °°Àº MouseEvent¸¦ ¸®ÅÏÇÕ´Ï´Ù. source°¡ nullÀÎ °æ¿ì, sourceEvent x¿Í y ¸â¹ö´Â destination ·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ µé¾î°¡´Â °Í°ú »óÁ¤µË´Ï´Ù. destination°¡ nullÀÎ °æ¿ì, ¸®ÅÏµÈ MouseEvent´Â source ÁÂÇ¥ ü°è¿¡ µé¾î°©´Ï´Ù. sourceEvent´Â º¯°æµÇÁö ¾Ê½À´Ï´Ù. »õ·Î¿î À̺¥Æ®°¡ ¸®Åϵ˴ϴ٠. destination°¡ null ÀÌ¿ÜÀÇ °æ¿ì, ¸®ÅÏµÈ À̺¥Æ®ÀÇ source Çʵå´Â destination·Î ¼³Á¤µË´Ï´Ù. translateMouseEvent() ¸Þ¼­µå¸¦ »ç¿ëÇϸé, source¸¦ º¯°æÇÏÁö ¾Ê°í, ÄÄÆÛ³ÍÆ®ÀÇ ¸¶¿ì½º À̺¥Æ®¸¦ ´Ù¸¥ ÄÄÆÛ³ÍÆ®·Î º¯È¯ÇÒ ¼ö ÀÖ½À´Ï´Ù.


convertPointToScreen

public static void convertPointToScreen(Point  p,
                                        Component  c)
Æ÷ÀÎÆ®¸¦ ÄÄÆÛ³ÍÆ®ÀÇ ÁÂÇ¥ ü°è·ÎºÎÅÍ È­¸é ÁÂÇ¥·Î º¯È¯ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
p - »õ·Î¿î ÁÂÇ¥ ü°è¿¡ º¯È¯µÇ´Â Point °´Ã¼
c - Component °´Ã¼

convertPointFromScreen

public static void convertPointFromScreen(Point  p,
                                          Component  c)
Æ÷ÀÎÆ®¸¦ È­¸é ÁÂÇ¥·ÎºÎÅÍ ÄÄÆÛ³ÍÆ®ÀÇ ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
p - »õ·Î¿î ÁÂÇ¥ ü°è¿¡ º¯È¯µÇ´Â Point °´Ã¼
c - Component °´Ã¼

windowForComponent

public static Window  windowForComponent(Component  c)
c ÃÖÃÊÀÇ »óÀ§ Window¸¦ ¸®ÅÏÇÕ´Ï´Ù. c°¡ Window ³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÁÖ: ÀÌ ¸Þ¼­µåÀÇ ±â´ÉÀº, getWindowAncestor¿Í °°½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
c - »óÀ§ Window¸¦ ¾ò´Â Component
¹Ýȯ°ª:
c ÃÖÃÊÀÇ »óÀ§ Window. c°¡ Window ³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â null

isDescendingFrom

public static boolean isDescendingFrom(Component  a,
                                       Component  b)
ÄÄÆÛ³ÍÆ® a°¡ ÄÄÆÛ³ÍÆ® b ÇÏÀ§¿¡ ÀÖ´Â °æ¿ì, true¸¦ ¸®ÅÏÇÕ´Ï´Ù.


computeIntersection

public static Rectangle  computeIntersection(int x,
                                            int y,
                                            int width,
                                            int height,
                                            Rectangle  dest)
»õ·Î¿î ±¸ÇüÀ» ÇÒ´çÇÏÁö ¾Ê°í, 2°³ÀÇ ±¸ÇüÀÇ °øÅë ºÎºÐÀ» °è»êÇϴµ¥ Æí¸®ÇÕ´Ï´Ù. 2°³ÀÇ ±¸ÇüÀÌ ±³Â÷ÇÏ°í ÀÖÁö ¾Ê´Â °æ¿ì, ¸®ÅÏµÈ ±¸ÇüÀº (0,0)ÀÇ À§Ä¡·ÎºÎÅÍ ½ÃÀ۵Ǿî, 0 Æø°ú 0 ³ôÀ̸¦ °¡Áý´Ï´Ù.

ÆĶó¹ÌÅÍ:
x - ÃÖÃÊÀÇ ±¸ÇüÀÇ Á»óÀÇ Á¡ÀÇ X ÁÂÇ¥
y - ÃÖÃÊÀÇ ±¸ÇüÀÇ Á»óÀÇ Á¡ÀÇ Y ÁÂÇ¥
width - ÃÖÃÊÀÇ ±¸ÇüÀÇ Æø
height - ÃÖÃÊÀÇ ±¸ÇüÀÇ ³ôÀÌ
dest - 2¹ø°ÀÇ ±¸Çü
¹Ýȯ°ª:
°øÅë ºÎºÐÀ» ÁöÁ¤Çϱâ À§Çؼ­ º¯°æµÈ dest

computeUnion

public static Rectangle  computeUnion(int x,
                                     int y,
                                     int width,
                                     int height,
                                     Rectangle  dest)
»õ·Î¿î ±¸ÇüÀ» ÇÒ´çÇÏÁö ¸»°í 2°³ÀÇ ±¸ÇüÀÇ °áÇÕ ºÎºÐÀ» »êÃâÇÏ´Â °£ÀÌ ¸Þ¼­µåÀÔ´Ï´Ù.

ÆĶó¹ÌÅÍ:
x - ÃÖÃÊÀÇ ±¸ÇüÀÇ x ÁÂÇ¥
y - ÃÖÃÊÀÇ ±¸ÇüÀÇ y ÁÂÇ¥
width - ÃÖÃÊÀÇ ±¸ÇüÀÇ Æø
height - ÃÖÃÊÀÇ ±¸ÇüÀÇ ³ôÀÌ
dest - 2¹ø°ÀÇ ±¸ÇüÀÇ ÁÂÇ¥. 2°³ÀÇ ±¸ÇüÀÇ °áÇÕ ºÎºÐÀÌ ÀÌ ±¸ÇüÀ¸·Î ¸®ÅϵȴÙ
¹Ýȯ°ª:
dest Rectangle

computeDifference

public static Rectangle [] computeDifference(Rectangle  rectA,
                                            Rectangle  rectB)
rectA ³»¿¡¼­ rectB¿Í ¿À¹ö·¦ ÇÏÁö ¾Ê´Â ¿µ¿ªÀ» Ç¥ÇöÇÏ´Â ±¸ÇüÀÇ ¹è¿­À» µ¹·ÁÁִµ¥ Æí¸®ÇÕ´Ï´Ù. 2°³ÀÇ ±¸ÇüÀÌ ¿À¹ö·¦ ÇÏÁö ¾Ê´Â °æ¿ì´Â ºñ¾îÀÖ´Â ¹è¿­À» ¸®ÅÏÇÕ´Ï´Ù.


isLeftMouseButton

public static boolean isLeftMouseButton(MouseEvent  anEvent)
¸¶¿ì½º À̺¥Æ®°¡ ¿ÞÂÊ mouse button¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
anEvent - MouseEvent °´Ã¼
¹Ýȯ°ª:
¿ÞÂÊ mouse button°¡ ¾×ƼºêÇß´ø °æ¿ì´Â true

isMiddleMouseButton

public static boolean isMiddleMouseButton(MouseEvent  anEvent)
¸¶¿ì½º À̺¥Æ®°¡ Áß¾ÓÀÇ mouse button¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
anEvent - MouseEvent °´Ã¼
¹Ýȯ°ª:
Áß¾ÓÀÇ mouse button°¡ ¾×ƼºêÇß´ø °æ¿ì´Â true

isRightMouseButton

public static boolean isRightMouseButton(MouseEvent  anEvent)
¸¶¿ì½º À̺¥Æ®°¡ ¿À¸¥ÂÊ mouse button¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
anEvent - MouseEvent °´Ã¼
¹Ýȯ°ª:
¿À¸¥ÂÊ mouse button°¡ ¾×ƼºêÇß´ø °æ¿ì´Â true

computeStringWidth

public static int computeStringWidth(FontMetrics  fm,
                                     String  str)
ÁöÁ¤µÈ ¸ÞÆ®¸¯½º (»çÀÌÁî)¸¦ °¡Áö´Â ÆùÆ®¸¦ »ç¿ëÇØ Ä³¸¯ÅÍ ¶óÀÎÀÇ ³ÐÀ̸¦ °è»êÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
fm - °è»ê¿¡ »ç¿ëÇÏ´Â FontMetrics °´Ã¼
str - °è»ê ´ë»óÀÇ String
¹Ýȯ°ª:
ij¸¯ÅÍ ¶óÀÎÀÇ ÆøÀÌ Æ÷ÇԵǰí ÀÖ´Â int°ª

layoutCompoundLabel

public static String  layoutCompoundLabel(JComponent  c,
                                         FontMetrics  fm,
                                         String  text,
                                         Icon  icon,
                                         int verticalAlignment,
                                         int horizontalAlignment,
                                         int verticalTextPosition,
                                         int horizontalTextPosition,
                                         Rectangle  viewR,
                                         Rectangle  iconR,
                                         Rectangle  textR,
                                         int textIconGap)
¾ÆÀÌÄÜÀÇ ±âÁ¡ À§Ä¡, ÅؽºÆ®ÀÇ baselineÀÇ ±âÁ¡ À§Ä¡ ¹× °¡´ÉÇϸé Ŭ¸³ ÇÑ ¹öÀüÀÇ º¹ÇÕ ¶óº§ ij¸¯ÅÍ ¶óÀÎÀ» °è»êÇØ ¸®ÅÏÇÕ´Ï´Ù. ¿©·¯ºÐÄ¡´Â viewR ±¸ÇüÀ» ±âÁØ¿¡ °è»êµË´Ï´Ù. JComponent ¹æÇâ (LEADING ¶Ç´Â TRAILING)µµ °í·ÁµÇ¾î LEFT Ä¡ ¶Ç´Â RIGHT Ä¡¿¡ º¯È¯µË´Ï´Ù.


layoutCompoundLabel

public static String  layoutCompoundLabel(FontMetrics  fm,
                                         String  text,
                                         Icon  icon,
                                         int verticalAlignment,
                                         int horizontalAlignment,
                                         int verticalTextPosition,
                                         int horizontalTextPosition,
                                         Rectangle  viewR,
                                         Rectangle  iconR,
                                         Rectangle  textR,
                                         int textIconGap)
¾ÆÀÌÄÜÀÇ ±âÁ¡ À§Ä¡, ÅؽºÆ®ÀÇ baselineÀÇ ±âÁ¡ À§Ä¡ ¹× °¡´ÉÇϸé Ŭ¸³ ÇÑ ¹öÀüÀÇ º¹ÇÕ ¶óº§ ij¸¯ÅÍ ¶óÀÎÀ» °è»êÇØ ¸®ÅÏÇÕ´Ï´Ù. ¿©·¯ºÐÄ¡´Â viewR ±¸ÇüÀ» ±âÁØ¿¡ °è»êµË´Ï´Ù. ÀÌ layoutCompoundLabel()´Â horizontalTextPosition (µðÆúÆ®´Â RIGHT) ¹× horizontalAlignmentdoes (µðÆúÆ®´Â CENTER)ÀÇ LEADING Ä¡ ¹× TRAILING Ä¡¸¦ ó¸®ÇÒ ¼ö ¾ø½À´Ï´Ù. ´ë½Å¿¡ ´Ù¸¥ ¹öÀüÀÇ layoutCompoundLabel()¸¦ »ç¿ëÇØ ÁÖ¼¼¿ä.


paintComponent

public static void paintComponent(Graphics  g,
                                  Component  c,
                                  Container  p,
                                  int x,
                                  int y,
                                  int w,
                                  int h)
±¸ÇüÀÇ Á»󱸼® ¹× »çÀÌÁ ÁöÁ¤ÇØ, ÁöÁ¤µÈ ±¸Çü³»ÀÇ ÀÓÀÇÀÇ ±×·¡ÇÈ g·Î ÄÄÆÛ³ÍÆ® c¸¦ ÆäÀÎÆ® ÇÕ´Ï´Ù. ÄÄÆÛ³ÍÆ®´Â c.validate() È£Ãâ°ú c.repaint() È£ÃâÀÌ Æ®¸®¿¡ ÀüÆÄ ÇÏÁö ¾Ê°Ô ÇÏ´Â ÇÁ¶óÀ̺ø ÄÁÅ×ÀÌ³Ê (±× ºÎ¸ð°¡ p°¡ µÈ´Ù)¸¦ ºÎ¸ð·Î ¼³Á¤ÇÕ´Ï´Ù. ÀÌ Áß°£ ÄÁÅ×À̳ʿ¡´Â ÀÌ¿ÜÀÇ È¿°ú´Â ¾ø½À´Ï´Ù.

ÄÄÆÛ³ÍÆ®´Â JComponent ÇÏÀ§ÀÎÁö, ´Ù¸¥ Á¾·ùÀÇ °æ·® ÄÄÆÛ³ÍÆ®ÀÎ °ÍÀÌ ÇÊ¿äÇÕ´Ï´Ù. °æ·® ÄÄÆÛ³ÍÆ®¶õ Component isLightweight ¸Þ¼­µå¿¡ ÀÇÇØ ¸®ÅÏµÈ ¡¸°æ·®¡¹ÇÁ·ÎÆÛƼ°¡ true ÀÎ °Í °°Àº ÄÄÆÛ³ÍÆ®ÀÔ´Ï´Ù. Component°¡ °æ·®ÀÌ ¾Æ´Ñ °æ¿ì´Â Å©·¡½¬, ¿¹¿Ü, ÆäÀÎÆ® ¹®Á¦ µî, ºÎÁ¤ÇÑ »çÅ°¡ ¹ß»ýÇÏ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
g - ·»´õ¸µÃ³ÀÇ Graphics °´Ã¼
c - ·»´õ¸µ ´ë»óÀÇ Component
p - Áß°£ Container
x - ·»´õ¸µ ¿µ¿ªÀÇ Á´ÜÀ» ³ªÅ¸³»´Â int°ª (Çȼ¿ ´ÜÀ§). ±×·¡ÇÈ ÄÁÅؽºÆ® ÀÇ Á´ÜÀ» ±âÁØÀ¸·Î ÇÏ´Â
y - ·»´õ¸µ ¿µ¿ªÀÇ »ó´ÜÀ» ³ªÅ¸³»´Â int°ª (Çȼ¿ ´ÜÀ§). ±×·¡ÇÈ ÄÁÅؽºÆ® ÀÇ »ó´ÜÀ» ±âÁØÀ¸·Î ÇÏ´Â
w - ·»´õ¸µ ¿µ¿ªÀÇ ³ÐÀ̸¦ ³ªÅ¸³»´Â int°ª (Çȼ¿ ´ÜÀ§)
h - ·»´õ¸µ ¿µ¿ªÀÇ ³ôÀ̸¦ ³ªÅ¸³»´Â int°ª (Çȼ¿ ´ÜÀ§)
°ü·Ã Ç׸ñ:
Component.isLightweight()

paintComponent

public static void paintComponent(Graphics  g,
                                  Component  c,
                                  Container  p,
                                  Rectangle  r)
Rectangle °´Ã¼¸¦ ÁöÁ¤ÇØ, ÁöÁ¤µÈ ±¸Çü³»ÀÇ ÀÓÀÇÀÇ ±×·¡ÇÈ g·Î ÄÄÆÛ³ÍÆ® c¸¦ ÆäÀÎÆ® ÇÕ´Ï´Ù. ÄÄÆÛ³ÍÆ®´Â c.validate() È£Ãâ°ú c.repaint() È£ÃâÀÌ Æ®¸®¿¡ ÀüÆÄ ÇÏÁö ¾Ê°Ô ÇÏ´Â ÇÁ¶óÀ̺ø ÄÁÅ×ÀÌ³Ê (±× ºÎ¸ð°¡ p°¡ µÈ´Ù)¸¦ ºÎ¸ð·Î ¼³Á¤ÇÕ´Ï´Ù. ÀÌ Áß°£ ÄÁÅ×À̳ʿ¡´Â ÀÌ¿ÜÀÇ È¿°ú´Â ¾ø½À´Ï´Ù.

ÄÄÆÛ³ÍÆ®´Â JComponent ÇÏÀ§ÀÎÁö, ´Ù¸¥ Á¾·ùÀÇ °æ·® ÄÄÆÛ³ÍÆ®ÀÎ °ÍÀÌ ÇÊ¿äÇÕ´Ï´Ù. °æ·® ÄÄÆÛ³ÍÆ®¶õ Component isLightweight ¸Þ¼­µå¿¡ ÀÇÇØ ¸®ÅÏµÈ ¡¸°æ·®¡¹ÇÁ·ÎÆÛƼ°¡ true ÀÎ °Í °°Àº ÄÄÆÛ³ÍÆ®ÀÔ´Ï´Ù. Component°¡ °æ·®ÀÌ ¾Æ´Ñ °æ¿ì´Â Å©·¡½¬, ¿¹¿Ü, ÆäÀÎÆ® ¹®Á¦ µî, ºÎÁ¤ÇÑ »çÅ°¡ ¹ß»ýÇÏ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
g - ·»´õ¸µÃ³ÀÇ Graphics °´Ã¼
c - ·»´õ¸µ ´ë»óÀÇ Component
p - Áß°£ Container
r - ·»´õ¸µÃ³ÀÇ Rectangle
°ü·Ã Ç׸ñ:
Component.isLightweight()

updateComponentTreeUI

public static void updateComponentTreeUI(Component  c)
´Ü¼øÇÑ Look & Feel º¯°æÀ¸·Î Æ®¸®³»ÀÇ °¢ ³ëµå¿¡ updateUI() 󸮸¦ ½Ç½ÃÇÏ´Â °Í, Áï ÇöÀçÀÇ Look & Feel ·Î ±× UI ÇÁ·ÎÆÛƼ¸¦ ÃʱâÈ­ÇÏ´Â °ÍÀ» ¿ä±¸ÇÕ´Ï´Ù.


invokeLater

public static void invokeLater(Runnable  doRun)
doRun.run()¸¦, AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå·Î ºñµ¿±âÀûÀ¸·Î ½ÇÇà½Ãŵ´Ï´Ù. ÀÌ°ÍÀº º¸·ùÁßÀÇ ¸ðµç AWT À̺¥Æ®°¡ ó¸®µÈ µÚ¿¡ ¹ß»ýÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¾îÇø®ÄÉÀÌ¼Ç thread°¡ GUI¸¦ °»½ÅÇÒ ÇÊ¿ä°¡ ÀÖÀ» ¶§ »ç¿ëµË´Ï´Ù. ´ÙÀ½ÀÇ ¿¹¿¡¼­´Â invokeLater È£ÃâÀº À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå¿¡ Runnable °´Ã¼ÀÇ doHelloWorld Å¥¸¦ È£ÃâÇÏ°í ³ª¼­, ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÕ´Ï´Ù.

 Runnable doHelloWorld = new Runnable() {
     public void run() {
         System.out.println("Hello World on " + Thread.currentThread());
     }
 };

 SwingUtilities.invokeLater(doHelloWorld);
 System.out.println("This might well be displayed before the other message. ");
 
invokeLater°¡ À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå, ¿¹¸¦ µé¾î JButton ActionListener ·ÎºÎÅÍ ºÒ·Á °¬À» °æ¿ì, doRun.run()´Â º¸·ùÁßÀÇ ¸ðµç À̺¥Æ®°¡ ó¸®µÉ ¶§±îÁö ½ÇÇàÀÌ ¿¬±âµË´Ï´Ù. ´Ù¸¸, doRun.run()°¡ ijġ µÇÁö ¾Ê´Â ¿¹¿Ü¸¦ Throw ÇÏ´Â °æ¿ì´Â À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå (ÇöÀçÀÇ thread´Â ¾Æ´Ï´Ù)°¡ »óŸ¦ ¹ÙÅÁÀ¸·Î µÇµ¹¸³´Ï´Ù.

ÀÌ ¸Þ¼­µåÀÇ »ó¼¼¿Í ¿¹¿¡ ´ëÇؼ­´Â ¡¸The Java Tutorial¡¹ÀÇ ¡¸How to Use Threads¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

JDK ¹öÀü 1.3 ÀÌÈÄ, ÀÌ ¸Þ¼­µå´Â java.awt.EventQueue.invokeLater()·Î ¸¸ »ç¿ëµË´Ï´Ù.

°ü·Ã Ç׸ñ:
invokeAndWait(java.lang.Runnable)

invokeAndWait

public static void invokeAndWait(Runnable  doRun)
                          throws InterruptedException,

                                 InvocationTargetException 
doRun.run()¸¦, AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå·Î ºñµ¿±âÀûÀ¸·Î ½ÇÇà½Ãŵ´Ï´Ù. ÀÌ°ÍÀº º¸·ùÁßÀÇ ¸ðµç AWT À̺¥Æ®°¡ ó¸®µÉ ¶§±îÁö ºí·Ï µÇ¾î ´ÙÀ½¿¡ doRun.run()°¡ º¹±ÍÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¾îÇø®ÄÉÀÌ¼Ç thread°¡ GUI¸¦ °»½ÅÇÒ ÇÊ¿ä°¡ ÀÖÀ» ¶§ »ç¿ëµË´Ï´Ù. ÀÌ ¸Þ¼­µå´Â EventDispatchThread·Î ºÎÅÍ È£ÃâÇÏÁö ¸»¾Æ ÁÖ¼¼¿ä. »õ·Î¿î ¾îÇø®ÄÉÀÌ¼Ç thread¸¦ »ý¼ºÇÏ´Â ¿¹¸¦, ´ÙÀ½¿¡ ³ªÅ¸³À´Ï´Ù. ÀÌ ¿¹¿¡¼­´Â ¾îÇø®ÄÉÀÌ¼Ç thread´Â invokeAndWait¸¦ »ç¿ëÇØ À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå·ÎºÎÅÍ Ä³¸¯ÅÍ ¶óÀÎÀ» Ãâ·ÂÇØ, ±× ÈÄ, ¾îÇø®ÄÉÀÌ¼Ç thread·ÎºÎÅÍ Ä³¸¯ÅÍ ¶óÀÎÀ» Ãâ·ÂÇÕ´Ï´Ù.

 final Runnable doHelloWorld = new Runnable() {
     public void run() {
         System.out.println("Hello World on " + Thread.currentThread());
     }
 };

 Thread appThread = new Thread() {
     public void run() {
         try {
             SwingUtilities.invokeAndWait(doHelloWorld);
         }
         catch (Exception e) {
             e.printStackTrace();
         }
         System.out.println("Finished on " + Thread.currentThread());
     }
 };
 appThread.start();
 
Runnable.run ¸Þ¼­µå°¡ ijġ µÇÁö ¾Ê´Â ¿¹¿Ü¸¦ À̺¥Æ®µð½ºÆÐÄ¡¿øthread·Î Throw ÇÏ´Â °æ¿ì´Â ±× ¿¹¿Ü´Â È£ÃâÇØ ¿·ÀÇ thread·ÎInvocationTargetException·Î ¼­ ijġ µÇ¾î ÀçThrow µÇ±â ¶§¹®¿¡ ÁÖÀÇÇØ ÁÖ¼¼¿ä.

ÀÌ ¸Þ¼­µåÀÇ »ó¼¼¿Í ¿¹¿¡ ´ëÇؼ­´Â ¡¸The Java Tutorial¡¹ÀÇ ¡¸How to Use Threads¡¹¸¦ ÂüÁ¶ÇϽʽÿÀ.

JDK ¹öÀü 1.3 ÀÌÈÄ, ÀÌ ¸Þ¼­µå´Â java.awt.EventQueue.invokeAndWait()·Î ¸¸ »ç¿ëµË´Ï´Ù.

¿¹¿Ü:
InterruptedException - À̺¥Æ®µð½ºÆÐÄ¡½º·¹µå°¡ doRun.run() ½ÇÇàÀ» ³¡³»´Â °ÍÀ» ±â´Ù¸®´Â µ¿¾È¿¡ ÀÎÅÍ·´Æ®¸¦ ¹Þ¾ÒÀ» °æ¿ì
InvocationTargetException - doRun ½ÇÇàÁß¿¡ ¿¹¿Ü°¡ ¹ß»ýµÇ´Â °æ¿ì
°ü·Ã Ç׸ñ:
invokeLater(java.lang.Runnable)

isEventDispatchThread

public static boolean isEventDispatchThread()
ÇöÀçÀÇ thread°¡ AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µåÀÇ °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

JDK ¹öÀü 1.3 ÀÌÈÄ, ÀÌ ¸Þ¼­µå´Â java.awt.EventQueue.isDispatchThread()·Î ¸¸ »ç¿ëµË´Ï´Ù.

¹Ýȯ°ª:
ÇöÀçÀÇ thread°¡ AWT À̺¥Æ®µð½ºÆÐÄ¡½º·¹µåÀÇ °æ¿ì´Â true

getAccessibleIndexInParent

public static int getAccessibleIndexInParent(Component  c)
»ç¿ëÀÚ º¸Á¶ÀÇ ºÎ¸ð¿¡¼­ÀÇ ÀÌ °´Ã¼ÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼­µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÀÌ °´Ã¼°¡ »ç¿ëÀÚ º¸Á¶ÀÇ ºÎ¸ð¸¦ °¡ÁöÁö ¾Ê´Â °æ¿ì´Â -1. ±×·¸Áö ¾ÊÀº °æ¿ì´Â »ç¿ëÀÚ º¸Á¶ÀÇ ºÎ¸ð¿¡°Ô ÀÖ´ÂÀÚ½Ä ÀÇ À妽º

getAccessibleAt

public static Accessible  getAccessibleAt(Component  c,
                                         Point  p)
·ÎÄà ÁÂÇ¥ÀÇ Point¿¡ Accessible ÀÚ½ÄÀÌ º¸°ü À¯ÁöµÇ°í ÀÖ´Â °æ¿ì´Â ±×°ÍÀ» ¸®ÅÏÇÕ´Ï´Ù. ±×·¸Áö ¾ÊÀº °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
Á¸ÀçÇÏ´Â °æ¿ì´Â ÁöÁ¤µÈ À§Ä¡ÀÇ Accessible. ±×·¸Áö ¾ÊÀº °æ¿ì´Â null

getAccessibleStateSet

public static AccessibleStateSet  getAccessibleStateSet(Component  c)
ÀÌ °´Ã¼ »óŸ¦ ÃëµæÇÕ´Ï´Ù.

ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼­µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.

¹Ýȯ°ª:
°´Ã¼ÀÇ ÇöÀç »óÅ ¼¼Æ®¸¦ º¸°ü À¯ÁöÇÏ´Â AccessibleStateSet ÀνºÅϽº
°ü·Ã Ç׸ñ:
AccessibleState

getAccessibleChildrenCount

public static int getAccessibleChildrenCount(Component  c)
°´Ã¼³»ÀÇ »ç¿ëÀÚ º¸Á¶ ±â´ÉÀÇÀÚ½Ä ÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. ÀÌ °´Ã¼ÀÇ ¸ðµç ÀÚ½ÄÀÌ Accessible¸¦ ±¸ÇöÇÏ´Â °æ¿ì, ÀÌ ¸Þ¼­µå´Â ÀÌ °´Ã¼ÀÇÀÚ½Ä ÀÇ ¼ö¸¦ µ¹·ÁÁÙ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.

ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼­µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.

¹Ýȯ°ª:
°´Ã¼³»ÀÇ »ç¿ëÀÚ º¸Á¶ ±â´ÉÀÇÀÚ½Ä ÀÇ ¼ö

getAccessibleChild

public static Accessible  getAccessibleChild(Component  c,
                                            int i)
°´Ã¼ÀÇ n ¹ø°ÀÇ Accessible ÀÚ½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼­µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
i - Á¦·Î·ÎºÎÅÍ ½ÃÀ۵ǴÂÀÚ½Ä ÀÇ À妽º
¹Ýȯ°ª:
°´Ã¼ÀÇ n ¹ø°ÀÇ Accessible ÀÚ½Ä

findFocusOwner

@Deprecated 
public static Component  findFocusOwner(Component  c)
ÃßõÇÏÁö ¾Ê½À´Ï´Ù.  ¹öÀü 1.4 ÀÌÈÄ, KeyboardFocusManager.getFocusOwner()·Î ¿Å°ÜÁ³½À´Ï´Ù.

ÁöÁ¤µÈ Component ÀÚ½Ä ComponentÀÌ Æ÷Ä¿½º ¼ÒÀ¯ÀÚÀÎ °æ¿ì, ±×ÀÚ½Ä Component¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
c - Æ÷Ä¿½º ¼ÒÀ¯ÀÚ¸¦ °Ë»öÇÒ ¶§ÀÇ Component °èÃþ ·çÆ®
¹Ýȯ°ª:
Æ÷Ä¿½º ¼ÒÀ¯ÀÚ. Æ÷Ä¿½º ¼ÒÀ¯ÀÚ°¡ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì, Æ÷Ä¿½º ¼ÒÀ¯ÀÚ°¡ comp°¡ ¾Æ´Ñ °æ¿ì, ¶Ç´Â Æ÷Ä¿½º ¼ÒÀ¯ÀÚ°¡ comp ÀÚ½Ä ÀÎ °æ¿ì´Â null
°ü·Ã Ç׸ñ:
KeyboardFocusManager.getFocusOwner()

getRootPane

public static JRootPane  getRootPane(Component  c)
c°¡ ÇÏÀ§ JRootPane °´Ã¼ÀÇ °æ¿ì´Â °Ô´Ù°¡ À§ JRootPane °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù. c°¡ RootPaneContainerÀÎ °æ¿ì´Â ±× JRootPane¸¦ ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
Component c JRootPane, ¶Ç´Â null

getRoot

public static Component  getRoot(Component  c)
ÇöÀçÀÇ ÄÄÆÛ³ÍÆ® Æ®¸®ÀÇ ·çÆ® ÄÄÆÛ³ÍÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
Window ÀÎ c ÃÖÃÊÀÇ »óÀ§ °´Ã¼, ¶Ç´Â ¸¶Áö¸· »óÀ§ Applet °´Ã¼

processKeyBindings

public static boolean processKeyBindings(KeyEvent  event)
event¿¡ °ü·ÃµÈ Component Å° ¹ÙÀεùÀ» ó¸®ÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå°¡ Æí¸®ÇÑ °ÍÀº, event.getComponent()°¡ JComponent ÇÏÀ§ÀÎ °æ¿ì, ¶Ç´Â JComponent ¼­ºê Ŭ·¡½º³»·ÎºÎÅÍ super.processKeyEvent¸¦ È£ÃâÇÏÁö ¾ÊÀº °æ¿ì »ÓÀÔ´Ï´Ù. JComponent´Â ÀÚ½ÅÀÇ processKeyEvent ¸Þ¼­µå³»·ÎºÎÅÍ ÀÚµ¿ÀûÀ¸·Î ¹ÙÀεùÀ» ó¸®Çϱâ À§ÇØ, ÀÌ ¸Þ¼­µå¸¦ Á÷Á¢ È£ÃâÇÏ´Â °ÍÀÌ ÇÊ¿äÇÑ °æ¿ì´Â °ÅÀÇ ¾ø½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
event - Æ÷Ä¿½º¸¦ °¡Áö´Â Component ¹× ó¸® ´ë»óÀÇ ¹ÙÀεùÀ» ÁöÁ¤ÇÏ´Â KeyEvent
¹Ýȯ°ª:
¹ÙÀεùÀÌ ¹ß°ßµÇ¾î 󸮵ǾúÀ» °æ¿ì´Â true
µµÀÔµÈ ¹öÀü :
1.4

notifyAction

public static boolean notifyAction(Action  action,
                                   KeyStroke  ks,
                                   KeyEvent  event,
                                   Object  sender,
                                   int modifiers)
action°¡ »ç¿ë °¡´ÉÇØ, ÇÑÆí nullÀÌ ¾Æ´Ñ °æ¿ì, action actionPerformed¸¦ È£ÃâÇÕ´Ï´Ù. ActionEvent Ä¿¸àµå´Â ´ÙÀ½ÀÇ °ªÀ¸·Î ÁöÁ¤µË´Ï´Ù.
  1. ¾×¼ÇÀÌ registerKeyboardActionÀ» »ç¿ëÇØ µî·ÏµÇ¾úÀ» °æ¿ì´Â °Ç³×¹ÞÀº Ä¿¸àµå ij¸¯ÅÍ ¶óÀÎ (nullÀÌ °Ç³×¹Þ¾ÒÀ» °æ¿ì´Â nullÀÌ »ç¿ëµÈ´Ù)
  2. nullÀÌ ¾Æ´Ñ ÇÑ, Action.ACTION_COMMAND_KEY ¶ó´Â À̸§À» °¡Áö´Â Action Ä¡
  3. getKeyChar°¡ KeyEvent.CHAR_UNDEFINED¸¦ µ¹·ÁÁÖÁö ¾Ê´Â ÇÑ, KeyEvent String Ä¡
action°¡ null ÀÌ¿Ü·Î actionPerformed°¡ ºÒ·Á°¡ ¸é, true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

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

replaceUIInputMap

public static void replaceUIInputMap(JComponent  component,
                                     int type,
                                     InputMap  uiInputMap)
component UI InputMap¸¦ uiInputMap·Î º¯°æÇÏ´Â °£ÀÌ ¸Þ¼­µåÀÔ´Ï´Ù. uiInputMap°¡ nullÀÎ °æ¿ì, ÀÌ ¸Þ¼­µå´Â ÀÌÀü¿¡ ÀνºÅç µÈ UI InputMap¸¦ »èÁ¦ÇÕ´Ï´Ù.

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

replaceUIActionMap

public static void replaceUIActionMap(JComponent  component,
                                      ActionMap  uiActionMap)
component UI ActionMap¸¦ uiActionMap·Î º¯°æÇÏ´Â °£ÀÌ ¸Þ¼­µåÀÔ´Ï´Ù. uiActionMap°¡ nullÀÎ °æ¿ì, ÀÌ ¸Þ¼­µå´Â ÀÌÀü¿¡ ÀνºÅç µÈ UI ActionMap¸¦ »èÁ¦ÇÕ´Ï´Ù.

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

getUIInputMap

public static InputMap  getUIInputMap(JComponent  component,
                                     int condition)
UI°¡ component condition·Î ÁöÁ¤ÇÑ InputMap¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â UI°¡ ÁöÁ¤µÈ ÇüÅÂÀÇ InputMap¸¦ ÀνºÅç ÇÏ°í ÀÖÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.

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

getUIActionMap

public static ActionMap  getUIActionMap(JComponent  component)
UI°¡ component·Î ÁöÁ¤ÇÑ ActionMap¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â UI°¡ ÁöÁ¤µÈ ÇüÅÂÀÇ ActionMap¸¦ ÀνºÅç ÇÏ°í ÀÖÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.

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

calculateInnerArea

public static Rectangle  calculateInnerArea(JComponent  c,
                                           Rectangle  r)
r ³»¿¡¼­ ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ³»ºÎ ÆäÀÎÆ® ¿µ¿ªÀÇ À§Ä¡¿Í »çÀÌÁ Æ÷ÇÔÇØ, r¸¦ ¸®ÅÏÇÕ´Ï´Ù. À§Ä¡¿Í »çÀÌÁî´Â ÄÄÆÛ³ÍÆ®ÀÇ °æ°è¸¦ ³ªÅ¸³», º¸´õ ¿µ¿ªÀ» Æ÷ÇÔÇÏÁö ¾Ê°Ô Á¶Á¤µË´Ï´Ù (ÀÎ ¼¼Æ®). ÀÌ ¸Þ¼­µå´Â ÆäÀÎÆ® ÇÏ´Â Äڵ带 ±¸ÇöÇϴ Ŭ·¡½º¿¡ ´ëÇؼ­ Æí¸®ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
c - ´ë»óÀÇ JComponent. ÀÌ ¸Þ¼­µå°¡ nullÀ» µ¹·ÁÁÖ´Â °æ¿ì´Â null
r - º¯°æµÇ´Â Rectangle ÀνºÅϽº ¶Ç´Â null
¹Ýȯ°ª:
Component°¡ nullÀÎ °æ¿ì´Â null. ±×·¸Áö ¾ÊÀº °æ¿ì´Â °Ç³×¹Þ´Â ±¸Çü (null ÀÌ¿ÜÀÇ °æ¿ì) ¶Ç´Â À§Ä¡¿Í »çÀÌÁîÀÇ Á¤º¸¸¦ ³ªÅ¸³»´Â »õ·Î¿î ±¸Çü
µµÀÔµÈ ¹öÀü :
1.4

JavaTM 2 Platform
Standard Ed. 5.0

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