|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.swing.SwingUtilities
public class SwingUtilities
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)
ÁöÁ¤µÈ ¸ÞÆ®¸¯½º (»çÀÌÁî)¸¦ °¡Áö´Â ÆùÆ®¸¦ »ç¿ëÇØ ij¸¯ÅÍ ¶óÀÎÀÇ ³ÐÀ̸¦ °è»êÇÕ´Ï´Ù. |
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 |
¸Þ¼µåÀÇ »ó¼¼ |
---|
public static final boolean isRectangleContainingRectangle(Rectangle a, Rectangle b)
a
°¡ b
¸¦ º¸°ü À¯ÁöÇÏ´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
public static Rectangle getLocalBounds(Component aComponent)
aComponent
ÄÄÆÛ³ÍÆ®ÀÇ ±¸Çü (0,0, bounds.width, bounds.height)À» ¸®ÅÏÇÕ´Ï´Ù.
public static Window getWindowAncestor(Component c)
c
ÃÖÃÊÀÇ »óÀ§ Window
¸¦ ¸®ÅÏÇÕ´Ï´Ù. c
°¡ Window
³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â nullÀ»
¸®ÅÏÇÕ´Ï´Ù.
c
- ȗˤ Window
¸¦ ¾ò´Â Component
c
ÃÖÃÊÀÇ »óÀ§ Window
. c
°¡ Window
³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â nullpublic static Point convertPoint(Component source, Point aPoint, Component destination)
source
ÁÂÇ¥ ü°èÀÇ aPoint
¸¦ destination
ÁÂÇ¥ ü°è·Î º¯È¯ÇÕ´Ï´Ù. source
°¡ nullÀÎ °æ¿ì, aPoint
´Â destination
·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ ÀÖ´Â °Í°ú »óÁ¤µË´Ï´Ù. destination
°¡ nullÀÎ °æ¿ì, aPoint
´Â source
·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ º¯È¯µË´Ï´Ù. source
¿Í
destination
°¡ ¾î´À Âʰúµµ nullÀÎ °æ¿ì´Â º¯È¯ÇÏÁö ¾Ê°í aPoint
¸¦ ¸®ÅÏÇÕ´Ï´Ù.
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)
¸¦ ¸®ÅÏÇÕ´Ï´Ù.
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
¸¦ ¸®ÅÏÇÕ´Ï´Ù.
public static Container getAncestorOfClass(Class <? > c, Component comp)
comp
»óÀ§¸¦ °Ë»öÇϱâ À§ÇÑ °£ÀÌ ¸Þ¼µåÀ̸ç, ¹ß°ßµÈ c
Ŭ·¡½ºÀÇ ÃÖÃÊÀÇ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù. c
Ŭ·¡½º°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì´Â nullÀ»
¸®ÅÏÇÕ´Ï´Ù.
public static Container getAncestorNamed(String name, Component comp)
comp
»óÀ§¸¦ °Ë»öÇϱâ À§ÇÑ °£ÀÌ ¸Þ¼µåÀ̸ç, ¹ß°ßµÈ name
ÃÖÃÊÀÇ °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù. name
°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì´Â nullÀ»
¸®ÅÏÇÕ´Ï´Ù.
public static Component getDeepestComponentAt(Component parent, int x, int y)
x
, y
¸¦ ³»Æ÷ ÇÏ´Â parent
¸¦ ºÎ¸ð·Î¼ °¡Áö´Â ÃÖÇÏÁ¤µµÀÇ °¡½Ã ÄÄÆÛ³ÍÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. parent
ÀÌ ÁöÁ¤µÈ À§Ä¡¸¦ ³»Æ÷ Çϰí ÀÖÁö ¾Ê´Â °æ¿ì´Â null
ÀÌ ¸®Åϵ˴ϴÙ
. parent
ÀÌ ÄÁÅ×À̳ʰ¡ ¾Æ´Ñ °æ¿ì, ȤÀº parent
°¡½ÃÀÇ ÀÚ½ÄÀÌ ¾î´À °Íµµ ÁöÁ¤µÈ À§Ä¡¸¦ ³»Æ÷ Çϰí ÀÖÁö ¾Ê´Â °æ¿ì´Â parent
ÀÌ ¸®Åϵ˴ϴÙ
.
parent
- °Ë»öÀ» °³½ÃÇÏ´Â ·çÆ® ÄÄÆÛ³ÍÆ®x
- x Ÿ°Ù À§Ä¡y
- y Ÿ°Ù À§Ä¡public static MouseEvent convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination)
destination
ÁÂÇ¥ ü°è¿¡ º¯È¯ ³¡³ °æ¿ì¸¦ Á¦¿ÜÇØ, sourceEvent
¿Í
°°Àº MouseEvent¸¦ ¸®ÅÏÇÕ´Ï´Ù. source
°¡ nullÀÎ °æ¿ì, sourceEvent
x¿Í
y ¸â¹ö´Â destination
·çÆ® ÄÄÆÛ³ÍÆ® ÁÂÇ¥ ü°è¿¡ µé¾î°¡´Â °Í°ú »óÁ¤µË´Ï´Ù. destination
°¡ null
ÀÎ °æ¿ì, ¸®ÅÏµÈ MouseEvent´Â source
ÁÂÇ¥ ü°è¿¡ µé¾î°©´Ï´Ù. sourceEvent
´Â º¯°æµÇÁö ¾Ê½À´Ï´Ù. »õ·Î¿î À̺¥Æ®°¡ ¸®Åϵ˴ϴÙ
. destination°¡ null ÀÌ¿ÜÀÇ °æ¿ì, ¸®ÅÏµÈ À̺¥Æ®ÀÇ source
Çʵå´Â destination
·Î
¼³Á¤µË´Ï´Ù. translateMouseEvent() ¸Þ¼µå¸¦ »ç¿ëÇϸé, source¸¦ º¯°æÇÏÁö ¾Ê°í,
ÄÄÆÛ³ÍÆ®ÀÇ ¸¶¿ì½º À̺¥Æ®¸¦ ´Ù¸¥ ÄÄÆÛ³ÍÆ®·Î º¯È¯ÇÒ ¼ö ÀÖ½À´Ï´Ù.
public static void convertPointToScreen(Point p, Component c)
p
- »õ·Î¿î ÁÂÇ¥ ü°è¿¡ º¯È¯µÇ´Â Point °´Ã¼c
- Component °´Ã¼public static void convertPointFromScreen(Point p, Component c)
p
- »õ·Î¿î ÁÂÇ¥ ü°è¿¡ º¯È¯µÇ´Â Point °´Ã¼c
- Component °´Ã¼public static Window windowForComponent(Component c)
c
ÃÖÃÊÀÇ »óÀ§ Window
¸¦ ¸®ÅÏÇÕ´Ï´Ù. c
°¡ Window
³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â nullÀ»
¸®ÅÏÇÕ´Ï´Ù.
ÁÖ: ÀÌ ¸Þ¼µåÀÇ ±â´ÉÀº, getWindowAncestor
¿Í
°°½À´Ï´Ù.
c
- ȗˤ Window
¸¦ ¾ò´Â Component
c
ÃÖÃÊÀÇ »óÀ§ Window
. c
°¡ Window
³»¿¡ Æ÷ÇÔµÇÁö ¾ÊÀº °æ¿ì´Â nullpublic static boolean isDescendingFrom(Component a, Component b)
a
°¡ ÄÄÆÛ³ÍÆ® b
ÇÏÀ§¿¡ ÀÖ´Â °æ¿ì, true
¸¦ ¸®ÅÏÇÕ´Ï´Ù.
public static Rectangle computeIntersection(int x, int y, int width, int height, Rectangle dest)
x
- ÃÖÃÊÀÇ ±¸ÇüÀÇ Á»óÀÇ Á¡ÀÇ X ÁÂÇ¥y
- ÃÖÃÊÀÇ ±¸ÇüÀÇ Á»óÀÇ Á¡ÀÇ Y ÁÂÇ¥width
- ÃÖÃÊÀÇ ±¸ÇüÀÇ Æøheight
- ÃÖÃÊÀÇ ±¸ÇüÀÇ ³ôÀÌdest
- 2¹øÂ°ÀÇ ±¸Çü
dest
public static Rectangle computeUnion(int x, int y, int width, int height, Rectangle dest)
x
- ÃÖÃÊÀÇ ±¸ÇüÀÇ x ÁÂÇ¥y
- ÃÖÃÊÀÇ ±¸ÇüÀÇ y ÁÂÇ¥width
- ÃÖÃÊÀÇ ±¸ÇüÀÇ Æøheight
- ÃÖÃÊÀÇ ±¸ÇüÀÇ ³ôÀÌdest
- 2¹øÂ°ÀÇ ±¸ÇüÀÇ ÁÂÇ¥. 2°³ÀÇ ±¸ÇüÀÇ °áÇÕ ºÎºÐÀÌ ÀÌ ±¸ÇüÀ¸·Î ¸®ÅϵȴÙ
dest
Rectangle
public static Rectangle [] computeDifference(Rectangle rectA, Rectangle rectB)
rectA
³»¿¡¼ rectB
¿Í
¿À¹ö·¦ ÇÏÁö ¾Ê´Â ¿µ¿ªÀ» Ç¥ÇöÇÏ´Â ±¸ÇüÀÇ ¹è¿À» µ¹·ÁÁִµ¥ Æí¸®ÇÕ´Ï´Ù. 2°³ÀÇ ±¸ÇüÀÌ ¿À¹ö·¦ ÇÏÁö ¾Ê´Â °æ¿ì´Â ºñ¾îÀÖ´Â ¹è¿À» ¸®ÅÏÇÕ´Ï´Ù.
public static boolean isLeftMouseButton(MouseEvent anEvent)
anEvent
- MouseEvent °´Ã¼public static boolean isMiddleMouseButton(MouseEvent anEvent)
anEvent
- MouseEvent °´Ã¼public static boolean isRightMouseButton(MouseEvent anEvent)
anEvent
- MouseEvent °´Ã¼public static int computeStringWidth(FontMetrics fm, String str)
fm
- °è»ê¿¡ »ç¿ëÇÏ´Â FontMetrics °´Ã¼str
- °è»ê ´ë»óÀÇ String
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)
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)
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()
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r)
g
·Î
ÄÄÆÛ³ÍÆ® c
¸¦ ÆäÀÎÆ® ÇÕ´Ï´Ù. ÄÄÆÛ³ÍÆ®´Â c.validate()
È£Ãâ°ú c.repaint()
È£ÃâÀÌ Æ®¸®¿¡ ÀüÆÄ ÇÏÁö ¾Ê°Ô ÇÏ´Â ÇÁ¶óÀ̺ø ÄÁÅ×ÀÌ³Ê (±× ºÎ¸ð°¡ p
°¡ µÈ´Ù)¸¦ ºÎ¸ð·Î ¼³Á¤ÇÕ´Ï´Ù. ÀÌ Áß°£ ÄÁÅ×À̳ʿ¡´Â ÀÌ¿ÜÀÇ È¿°ú´Â ¾ø½À´Ï´Ù.
ÄÄÆÛ³ÍÆ®´Â JComponent
ÇÏÀ§ÀÎÁö, ´Ù¸¥ Á¾·ùÀÇ °æ·® ÄÄÆÛ³ÍÆ®ÀÎ °ÍÀÌ ÇÊ¿äÇÕ´Ï´Ù. °æ·® ÄÄÆÛ³ÍÆ®¶õ
Component
isLightweight
¸Þ¼µå¿¡ ÀÇÇØ ¸®ÅϵÈ
¡¸°æ·®¡¹ÇÁ·ÎÆÛƼ°¡ true ÀÎ °Í °°Àº ÄÄÆÛ³ÍÆ®ÀÔ´Ï´Ù. Component°¡ °æ·®ÀÌ ¾Æ´Ñ °æ¿ì´Â Å©·¡½¬, ¿¹¿Ü, ÆäÀÎÆ® ¹®Á¦ µî, ºÎÁ¤ÇÑ »çŰ¡ ¹ß»ýÇÏ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù.
g
- ·»´õ¸µÃ³ÀÇ Graphics
°´Ã¼c
- ·»´õ¸µ ´ë»óÀÇ Component
p
- Áß°£ Container
r
- ·»´õ¸µÃ³ÀÇ Rectangle
Component.isLightweight()
public static void updateComponentTreeUI(Component c)
updateUI()
󸮸¦ ½Ç½ÃÇÏ´Â °Í, Áï ÇöÀçÀÇ Look & Feel ·Î ±× UI ÇÁ·ÎÆÛƼ¸¦ ÃʱâÈÇÏ´Â °ÍÀ» ¿ä±¸ÇÕ´Ï´Ù.
public static void invokeLater(Runnable doRun)
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)
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)
public static boolean isEventDispatchThread()
JDK ¹öÀü
1.3 ÀÌÈÄ, ÀÌ ¸Þ¼µå´Â java.awt.EventQueue.isDispatchThread()
·Î
¸¸ »ç¿ëµË´Ï´Ù.
public static int getAccessibleIndexInParent(Component c)
ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.
public static Accessible getAccessibleAt(Component c, Point p)
Point
¿¡ Accessible
ÀÚ½ÄÀÌ º¸°ü À¯ÁöµÇ°í ÀÖ´Â °æ¿ì´Â ±×°ÍÀ» ¸®ÅÏÇÕ´Ï´Ù. ±×·¸Áö ¾ÊÀº °æ¿ì´Â null
À»
¸®ÅÏÇÕ´Ï´Ù.
Accessible
. ±×·¸Áö ¾ÊÀº °æ¿ì´Â null
public static AccessibleStateSet getAccessibleStateSet(Component c)
ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.
AccessibleState
public static int getAccessibleChildrenCount(Component c)
ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.
public static Accessible getAccessibleChild(Component c, int i)
ÁÖ: Java 2 Ç÷§Æû v1. 3 ÀÌÈÄ, °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ »ç¿ëÇÏ´Â ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleIndexInParent()¸¦ È£ÃâÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.
i
- Á¦·Î·ÎºÎÅÍ ½ÃÀ۵ǴÂÀÚ½Ä
ÀÇ À妽º
@Deprecated public static Component findFocusOwner(Component c)
KeyboardFocusManager.getFocusOwner()
·Î
¿Å°ÜÁ³½À´Ï´Ù.
Component
ÀÚ½Ä
Component
ÀÌ Æ÷Ä¿½º ¼ÒÀ¯ÀÚÀÎ °æ¿ì, ±×ÀÚ½Ä
Component
¸¦ ¸®ÅÏÇÕ´Ï´Ù.
c
- Æ÷Ä¿½º ¼ÒÀ¯ÀÚ¸¦ °Ë»öÇÒ ¶§ÀÇ Component
°èÃþ ·çÆ®
comp
°¡ ¾Æ´Ñ °æ¿ì, ¶Ç´Â Æ÷Ä¿½º ¼ÒÀ¯ÀÚ°¡ comp
ÀÚ½Ä
ÀÎ °æ¿ì´Â null
KeyboardFocusManager.getFocusOwner()
public static JRootPane getRootPane(Component c)
public static Component getRoot(Component c)
public static boolean processKeyBindings(KeyEvent event)
event
¿¡ °ü·ÃµÈ
Component
Ű ¹ÙÀεùÀ» ó¸®ÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå°¡ Æí¸®ÇÑ °ÍÀº, event.getComponent()
°¡ JComponent
ÇÏÀ§ÀÎ °æ¿ì, ¶Ç´Â JComponent
¼ºê Ŭ·¡½º³»·ÎºÎÅÍ super.processKeyEvent
¸¦ È£ÃâÇÏÁö ¾ÊÀº °æ¿ì »ÓÀÔ´Ï´Ù. JComponent
´Â
ÀÚ½ÅÀÇ processKeyEvent
¸Þ¼µå³»·ÎºÎÅÍ ÀÚµ¿ÀûÀ¸·Î ¹ÙÀεùÀ» ó¸®Çϱâ À§ÇØ, ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇÏ´Â °ÍÀÌ ÇÊ¿äÇÑ °æ¿ì´Â °ÅÀÇ ¾ø½À´Ï´Ù.
event
- Æ÷Ä¿½º¸¦ °¡Áö´Â Component ¹× ó¸® ´ë»óÀÇ ¹ÙÀεùÀ» ÁöÁ¤ÇÏ´Â KeyEvent
public static boolean notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers)
action
°¡ »ç¿ë °¡´ÉÇØ, ÇÑÆí nullÀÌ ¾Æ´Ñ °æ¿ì, action
actionPerformed
¸¦ È£ÃâÇÕ´Ï´Ù. ActionEvent
Ä¿¸àµå´Â ´ÙÀ½ÀÇ °ªÀ¸·Î ÁöÁ¤µË´Ï´Ù. registerKeyboardAction
À»
»ç¿ëÇØ µî·ÏµÇ¾úÀ» °æ¿ì´Â °Ç³×¹ÞÀº Ä¿¸àµå ij¸¯ÅÍ ¶óÀÎ (nullÀÌ °Ç³×¹Þ¾ÒÀ» °æ¿ì´Â nullÀÌ »ç¿ëµÈ´Ù)getKeyChar
°¡ KeyEvent.CHAR_UNDEFINED¸¦ µ¹·ÁÁÖÁö ¾Ê´Â ÇÑ, KeyEvent
String ġaction
°¡ null Àܷ̿ΠactionPerformed°¡ ºÒ·Á°¡
¸é, true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
public static void replaceUIInputMap(JComponent component, int type, InputMap uiInputMap)
component
UI InputMap¸¦ uiInputMap
·Î
º¯°æÇÏ´Â °£ÀÌ ¸Þ¼µåÀÔ´Ï´Ù. uiInputMap
°¡ nullÀÎ °æ¿ì, ÀÌ ¸Þ¼µå´Â ÀÌÀü¿¡ ÀνºÅç µÈ UI InputMap¸¦ »èÁ¦ÇÕ´Ï´Ù.
public static void replaceUIActionMap(JComponent component, ActionMap uiActionMap)
component
UI ActionMap¸¦ uiActionMap
·Î
º¯°æÇÏ´Â °£ÀÌ ¸Þ¼µåÀÔ´Ï´Ù. uiActionMap
°¡ nullÀÎ °æ¿ì, ÀÌ ¸Þ¼µå´Â ÀÌÀü¿¡ ÀνºÅç µÈ UI ActionMap¸¦ »èÁ¦ÇÕ´Ï´Ù.
public static InputMap getUIInputMap(JComponent component, int condition)
component
condition
·Î
ÁöÁ¤ÇÑ InputMap¸¦ ¸®ÅÏÇÕ´Ï´Ù.
ÀÌ ¸Þ¼µå´Â UI°¡ ÁöÁ¤µÈ ÇüÅÂÀÇ InputMap¸¦ ÀνºÅç Çϰí ÀÖÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.
public static ActionMap getUIActionMap(JComponent component)
component
·Î
ÁöÁ¤ÇÑ ActionMap¸¦ ¸®ÅÏÇÕ´Ï´Ù.
ÀÌ ¸Þ¼µå´Â UI°¡ ÁöÁ¤µÈ ÇüÅÂÀÇ ActionMap¸¦ ÀνºÅç Çϰí ÀÖÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.
public static Rectangle calculateInnerArea(JComponent c, Rectangle r)
r
³»¿¡¼ ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ³»ºÎ ÆäÀÎÆ® ¿µ¿ªÀÇ À§Ä¡¿Í »çÀÌÁ Æ÷ÇÔÇØ, r
¸¦ ¸®ÅÏÇÕ´Ï´Ù. À§Ä¡¿Í »çÀÌÁî´Â ÄÄÆÛ³ÍÆ®ÀÇ °æ°è¸¦ ³ªÅ¸³», º¸´õ ¿µ¿ªÀ» Æ÷ÇÔÇÏÁö ¾Ê°Ô Á¶Á¤µË´Ï´Ù (ÀÎ ¼¼Æ®). ÀÌ ¸Þ¼µå´Â ÆäÀÎÆ® ÇÏ´Â Äڵ带 ±¸ÇöÇϴ Ŭ·¡½º¿¡ ´ëÇØ¼ Æí¸®ÇÕ´Ï´Ù.
c
- ´ë»óÀÇ JComponent. ÀÌ ¸Þ¼µå°¡ nullÀ»
µ¹·ÁÁÖ´Â °æ¿ì´Â nullr
- º¯°æµÇ´Â Rectangle ÀνºÅϽº ¶Ç´Â null
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.