JavaTM 2
Platform
Std.  Ed.  v1. 4.0

java.awt
Ŭ·¡½º Button

java.lang.Object 
  |
  +--java.awt.Component 
        |
        +--java.awt.Button
¸ðµç ±¸Çö ÀÎÅÍÆäÀ̽º:
Accessible , ImageObserver , MenuContainer , Serializable

public class Button
extends Component
implements Accessible

ÀÌ Å¬·¡½º´Â label ÷ºÎ ¹öưÀ» »ý¼ºÇÕ´Ï´Ù. ¾îÇø®ÄÉÀ̼ÇÀº ¹öưÀÌ ´­·ÈÀ» ¶§¿¡ ¾×¼ÇÀÌ ½ÇÇàµÇµµ·Ï(µíÀÌ) ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. ÀÌ À̹ÌÁö´Â Solaris operating system·Î Ç¥½ÃµÇ´Â Quit ¹öưÀÇ 3 °³ÀÇ ºä¸¦ ³ªÅ¸³À´Ï´Ù.

1 ¹øÂ°ÀÇ ºä´Â Åë»ó »óÅÂÀÇ ¹öưÀ» ³ªÅ¸³À´Ï´Ù. 2 ¹øÂ°ÀÇ ºä´Â ÀÔ·ÂÃÊÁ¡ÀÌ ÀÖÀ» ¶§ÀÇ ¹öưÀ» ³ªÅ¸³À´Ï´Ù. ¹öưÀÇ À±°ûÀº ¾îµÎ¿öÁ®, ¾×ƼºêÇÑ ¿ÀºêÁ§Æ®ÀÎ °ÍÀ» À¯Àú¿¡°Ô ³ªÅ¸³À´Ï´Ù. 3 ¹øÂ°ÀÇ ºä´Â À¯Àú°¡ ¹öư À§¿¡¼­ ¸¶¿ì½º¸¦ Ŭ¸¯ÇØ, ¾×¼ÇÀÇ ½ÇÇàÀ» ¿ä±¸ÇßÀ» ¶§ÀÇ ¹öưÀ» ³ªÅ¸³À´Ï´Ù.

¸¶¿ì½º¸¦ »ç¿ëÇØ ¹öưÀ» Ŭ¸¯ÇÏ´Â Á¦½ºÃß¾î´Â ¸¶¿ì½º°¡ ¹öư»ó¿¡¼­ ¹Ð·Á ¶¼¾î ³õ¾ÆÁ³À» ¶§¿¡ ¼Û½ÅµÇ´Â ActionEvent ÀÇ ÀνºÅϽº¿¡ °ü·ÃÁöÀ» ¼ö ÀÖ°í ÀÖ½À´Ï´Ù. ¾ðÁ¦ ¹öưÀÌ ¹Ð·È´ÂÁöÀÇ ÅëÁö´Â ÇÊ¿äÇÏÁö¸¸, ¾ðÁ¦ ¶¼¾î ³õ¾ÆÁ³´ÂÁöÀÇ ÅëÁö´Â ÇÊ¿äÇÏÁö ¾ÊÀº °æ¿ì, ¾îÇø®ÄÉÀ̼ÇÀº µ¶¸³ÇÑ µ¿ÀÛÀ¸·Î¼­ processMouseEvent ¸¦ Ư¼öÈ­ ÇÏ´Â Àϵµ,addMouseListener ¸¦ È£ÃâÇÏ´Â °ÍÀ¸·Î ¸¶¿ì½º À̺¥Æ®ÀÇ Ã»ÃëÀڷμ­ ÀÚ½ÅÀ» µî·ÏÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÀÌ·¯ÇÑ ¸Þ¼Òµå´Â ¾çÂÊ ¸ðµÎ, ¸ðµç ÄÄÆÛ³ÍÆ®ÀÇ Ãß»ó ½´ÆÛ Ŭ·¡½ºÀÎ Component ¿¡ ÀÇÇØ Á¤Àǵ˴ϴÙ.

¹öưÀÌ ¹Ð·Á ¶¼¾î ³õ¾ÆÁö¸é(ÀÚ), AWT ´Â ¹öưÀÇ processEvent ¸¦ È£ÃâÇÏ´Â °ÍÀ¸·Î, ¹öư¿¡ ActionEvent ÀÇ ÀνºÅϽº¸¦ º¸³À´Ï´Ù. ¹öưÀÇ processEvent ¸Þ¼Òµå´Â ±× ¹öưÀÇ ¸ðµç À̺¥Æ®¸¦ ¹Þ½À´Ï´Ù. ¹öưÀº ÀÚ½ÅÀÇ processActionEvent ¸Þ¼Òµå¸¦ È£ÃâÇÏ´Â °Í¿¡ ÀÇÇØ ¾×¼Ç À̺¥Æ®¸¦ °Ç³×ÁÝ´Ï´Ù. processActionEvent ¸Þ¼Òµå´Â ÀÌ ¹öư¿¡ ÀÇÇØ »ý¼ºµÇ´Â ¾×¼Ç À̺¥Æ®ÀÇ ÅëÁö¸¦ ´ë»óÀ¸·Î ÇØ µî·ÏµÇ¾î ÀÖ´Â ¾×¼Ç ûÃëÀÚ¿¡°Ô ¾×¼Ç À̺¥Æ®¸¦ °Ç³×ÁÝ´Ï´Ù.

¹Ð·Á ¶¼¾î ³õ¾ÆÁö´Â ¹öư¿¡ ±Ù°ÅÇØ ¾×¼ÇÀ» ½ÇÇàÇÏ´Â °æ¿ì, ¾îÇø®ÄÉÀ̼ÇÀº ActionListener ¸¦ ±¸ÇöÇØ, ¹öưÀÇ addActionListener ¸Þ¼Òµå¸¦ È£ÃâÇÏ´Â °ÍÀ¸·Î, ÀÌ ¹öưÀ¸·ÎºÎÅÍ À̺¥Æ®¸¦ ¹Þµµ·Ï(µíÀÌ) »õ·Î¿î ûÃëÀÚ¸¦ µî·ÏÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ¾îÇø®ÄÉÀ̼ÇÀº ¹öưÀÇ ¾×¼Ç Ä¿¸àµå¸¦ ¸Þ¼¼Áö ÇÁ·ÎÅäÄݷμ­ »ç¿ëÇÕ´Ï´Ù.

µµÀÔµÈ ¹öÁ¯:
JDK1. 0
°ü·Ã Ç׸ñ:
ActionEvent , ActionListener , Component.processMouseEvent(java.awt.event.MouseEvent) , Component.addMouseListener(java.awt.event.MouseListener) , Á÷·ÄÈ­ µÈ Çü½Ä

ÁßøµÈ Ŭ·¡½ºÀÇ °³¿ä
protected  class Button.AccessibleAWTButton
          ÀÌ Å¬·¡½º´Â Button Ŭ·¡½º¿ëÀÇ À¯Àú º¸Á¶ ±â´ÉÀÇ ¼­Æ÷Æ®¸¦ ±¸ÇöÇϰí ÀÖ½À´Ï´Ù.
 
Ŭ·¡½º java.awt. Component À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º
Component.BltBufferStrategy , Component.FlipBufferStrategy
 
ÇʵåÀÇ °³¿ä
 
Ŭ·¡½º java.awt. Component ¿¡¼­ »ó¼Ó¹ÞÀº Çʵå
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT
 
ÀÎÅÍÆäÀ̽º java.awt.image. ImageObserver ¿¡¼­ »ó¼Ó¹ÞÀº Çʵå
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH
 
»ý¼ºÀÚÀÇ °³¿ä
Button ()
          label ¾øÀ½ÀÇ ¹öưÀ» ±¸ÃàÇÕ´Ï´Ù.
Button (String  label)
          ÁöÁ¤µÈ label¸¦ °¡Áö´Â ¹öưÀ» ±¸ÃàÇÕ´Ï´Ù.
 
¸Þ¼ÒµåÀÇ °³¿ä
 void addActionListener (ActionListener  l)
          ÀÌ ¹öưÀ¸·ÎºÎÅÍ ¾×¼Ç À̺¥Æ®¸¦ ¹Þ±â À§Çؼ­(¶§¹®¿¡), ÁöÁ¤µÈ ¾×¼Ç ûÃëÀÚ¸¦ Ãß°¡ÇÕ´Ï´Ù.
 void addNotify ()
          ¹öưÀÇ ÇǾ ±¸ÃàÇÕ´Ï´Ù.
 AccessibleContext getAccessibleContext ()
          ÀÌ Button ¿¡ °ü·ÃÁöÀ» ¼ö ÀÖ´Â AccessibleContext ¸¦ ÃëµæÇÕ´Ï´Ù.
 String getActionCommand ()
          ÀÌ ¹öưÀ¸·Î ¹æ¾Æ¼è µÇ´Â ¾×¼Ç À̺¥Æ®ÀÇ Ä¿¸àµå¸íÀ» µ¹·ÁÁÝ´Ï´Ù.
 ActionListener [] getActionListeners ()
          ÀÌ ¹öư¿¡ µî·ÏµÇ¾î ¸ðµç ¾×¼Ç ûÃëÀÚÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.
 String getLabel ()
          ¹öưÀÇ label¸¦ µ¹·ÁÁÝ´Ï´Ù.
 EventListener [] getListeners (Class  listenerType)
          ÀÌ Button ¿¡ FooListener ·Î¼­ ÇöÀç µî·ÏµÇ¾î ¸ðµç ¿ÀºêÁ§Æ®ÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.
protected  String paramString ()
          ÀÌ Button »óŸ¦ ³ªÅ¸³»´Â ij¸¯ÅÍ ¶óÀÎÀ» µ¹·ÁÁÝ´Ï´Ù.
protected  void processActionEvent (ActionEvent  e)
          ÀÌ ¹öưÀ¸·Î ¹ß»ýÇÏ´Â ¾×¼Ç À̺¥Æ®¸¦, µî·ÏµÇ¾î ÀÖ´Â ActionListener ¿ÀºêÁ§Æ®¿¡ µð½ºÆÌÄ¡ ÇÏ´Â °ÍÀ¸·Î½á, ¾×¼Ç À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù.
protected  void processEvent (AWTEvent  e)
          ÀÌ ¹öư¿¡ °üÇÑ À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù.
 void removeActionListener (ActionListener  l)
          ÀÌ ¹öưÀ¸·ÎºÎÅÍ ¾×¼Ç À̺¥Æ®¸¦ ¹ÞÁö ¾Ê°Ô, ÁöÁ¤µÈ ¾×¼Ç ûÃëÀÚ¸¦ »èÁ¦ÇÕ´Ï´Ù.
 void setActionCommand (String  command)
          ÀÌ ¹öư¿¡ ÀÇÇØ ¹æ¾Æ¼è µÇ´Â ¾×¼Ç À̺¥Æ®ÀÇ Ä¿¸àµå¸íÀ» ¼³Á¤ÇÕ´Ï´Ù.
 void setLabel (String  label)
          ¹öưÀÇ label¸¦, ÁöÁ¤µÈ ij¸¯ÅÍ ¶óÀÎÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù.
 
Ŭ·¡½º java.awt. Component ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
action , add , addComponentListener , addFocusListener , addHierarchyBoundsListener , addHierarchyListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addMouseWheelListener , addPropertyChangeListener , addPropertyChangeListener , applyComponentOrientation , areFocusTraversalKeysSet , bounds , checkImage , checkImage , coalesceEvents , contains , contains , createImage , createImage , createVolatileImage , createVolatileImage , deliverEvent , disable , disableEvents , dispatchEvent , doLayout , enable , enable , enableEvents , enableInputMethods , firePropertyChange , firePropertyChange , firePropertyChange , getAlignmentX , getAlignmentY , getBackground , getBounds , getBounds , getColorModel , getComponentAt , getComponentAt , getComponentListeners , getComponentOrientation , getCursor , getDropTarget , getFocusCycleRootAncestor , getFocusListeners , getFocusTraversalKeys , getFocusTraversalKeysEnabled , getFont , getFontMetrics , getForeground , getGraphics , getGraphicsConfiguration , getHeight , getHierarchyBoundsListeners , getHierarchyListeners , getIgnoreRepaint , getInputContext , getInputMethodListeners , getInputMethodRequests , getKeyListeners , getLocale , getLocation , getLocation , getLocationOnScreen , getMaximumSize , getMinimumSize , getMouseListeners , getMouseMotionListeners , getMouseWheelListeners , getName , getParent , getPeer , getPreferredSize , getPropertyChangeListeners , getPropertyChangeListeners , getSize , getSize , getToolkit , getTreeLock , getWidth , getX , getY , gotFocus , handleEvent , hasFocus , hide , imageUpdate , inside , invalidate , isBackgroundSet , isCursorSet , isDisplayable , isDoubleBuffered , isEnabled , isFocusable , isFocusCycleRoot , isFocusOwner , isFocusTraversable , isFontSet , isForegroundSet , isLightweight , isOpaque , isShowing , isValid , isVisible , keyDown , keyUp , layout , list , list , list , list , list , locate , location , lostFocus , minimumSize , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paint , paintAll , postEvent , preferredSize , prepareImage , prepareImage , print , printAll , processComponentEvent , processFocusEvent , processHierarchyBoundsEvent , processHierarchyEvent , processInputMethodEvent , processKeyEvent , processMouseEvent , processMouseMotionEvent , processMouseWheelEvent , remove , removeComponentListener , removeFocusListener , removeHierarchyBoundsListener , removeHierarchyListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removeMouseWheelListener , removeNotify , removePropertyChangeListener , removePropertyChangeListener , repaint , repaint , repaint , repaint , requestFocus , requestFocus , requestFocusInWindow , requestFocusInWindow , reshape , resize , resize , setBackground , setBounds , setBounds , setComponentOrientation , setCursor , setDropTarget , setEnabled , setFocusable , setFocusTraversalKeys , setFocusTraversalKeysEnabled , setFont , setForeground , setIgnoreRepaint , setLocale , setLocation , setLocation , setName , setSize , setSize , setVisible , show , show , size , toString , transferFocus , transferFocusBackward , transferFocusUpCycle , update , validate
 
Ŭ·¡½º java.lang. Object ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

»ý¼ºÀÚÀÇ »ó¼¼

Button

public Button()
       throws HeadlessException 
label ¾øÀ½ÀÇ ¹öưÀ» ±¸ÃàÇÕ´Ï´Ù.

¿¹¿Ü:
HeadlessException - GraphicsEnvironment.isHeadless()°¡ true ¸¦ µ¹·ÁÁÖ´Â °æ¿ì
°ü·Ã Ç׸ñ:
GraphicsEnvironment.isHeadless()

Button

public Button(String  label)
       throws HeadlessException 
ÁöÁ¤µÈ label¸¦ °¡Áö´Â ¹öưÀ» ±¸ÃàÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
label - ¹öưÀÇ Ä³¸¯ÅÍ ¶óÀÎ label
¿¹¿Ü:
HeadlessException - GraphicsEnvironment.isHeadless()°¡ true ¸¦ µ¹·ÁÁÖ´Â °æ¿ì
°ü·Ã Ç׸ñ:
GraphicsEnvironment.isHeadless()
¸Þ¼ÒµåÀÇ »ó¼¼

addNotify

public void addNotify()
¹öưÀÇ ÇǾ ±¸ÃàÇÕ´Ï´Ù. ¹öưÀÇ ÇǾî´Â ¾îÇø®ÄÉÀ̼ÇÀÌ ±â´ÉÀ» º¯°æÇÏÁö ¾Ê°í ¹öưÀÇ ¿Ü°üÀ» º¯°æÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ addNotify
°ü·Ã Ç׸ñ:
Toolkit.createButton(java.awt.Button) , Component.getToolkit()

getLabel

public String  getLabel()
¹öưÀÇ label¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
¹öưÀÇ label. ¹öư¿¡ label°¡ ¾ø´Â °æ¿ì´Â null
°ü·Ã Ç׸ñ:
setLabel(java.lang.String)

setLabel

public void setLabel(String  label)
¹öưÀÇ label¸¦, ÁöÁ¤µÈ ij¸¯ÅÍ ¶óÀÎÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
label - »õ·Î¿î label. ¹öư¿¡ label°¡ ¾ø´Â °æ¿ì´Â null
°ü·Ã Ç׸ñ:
getLabel()

setActionCommand

public void setActionCommand(String  command)
ÀÌ ¹öư¿¡ ÀÇÇØ ¹æ¾Æ¼è µÇ´Â ¾×¼Ç À̺¥Æ®ÀÇ Ä¿¸àµå¸íÀ» ¼³Á¤ÇÕ´Ï´Ù. µðÆúÆ®¿¡¼­´Â ÀÌ ¾×¼Ç Ä¿¸àµå´Â ¹öưÀÇ label¿Í ÀÏÄ¡Çϵµ·Ï(µíÀÌ) ¼³Á¤µË´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
command - ¹öưÀÇ ¾×¼Ç Ä¿¸àµå ¼³Á¤¿¡ »ç¿ëµÇ´Â ij¸¯ÅÍ ¶óÀÎ. ij¸¯ÅÍ ¶óÀÎÀÌ null ÀÇ °æ¿ì, ¾×¼Ç Ä¿¸àµå´Â ¹öưÀÇ label¿Í ÀÏÄ¡Çϵµ·Ï(µíÀÌ) ¼³Á¤µÇ´Â
µµÀÔµÈ ¹öÁ¯:
JDK1. 1
°ü·Ã Ç׸ñ:
ActionEvent

getActionCommand

public String  getActionCommand()
ÀÌ ¹öưÀ¸·Î ¹æ¾Æ¼è µÇ´Â ¾×¼Ç À̺¥Æ®ÀÇ Ä¿¸àµå¸íÀ» µ¹·ÁÁÝ´Ï´Ù. Ä¿¸àµå¸íÀÌ null (µðÆúÆ®)ÀÇ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ¹öưÀÇ label¸¦ µ¹·ÁÁÝ´Ï´Ù.


addActionListener

public void addActionListener(ActionListener  l)
ÀÌ ¹öưÀ¸·ÎºÎÅÍ ¾×¼Ç À̺¥Æ®¸¦ ¹Þ±â À§Çؼ­(¶§¹®¿¡), ÁöÁ¤µÈ ¾×¼Ç ûÃëÀÚ¸¦ Ãß°¡ÇÕ´Ï´Ù. ¾×¼Ç À̺¥Æ®´Â À¯Àú°¡ ÀÌ ¹öư À§¿¡¼­ mouse button¸¦ ´©¸£°Å³ª ¶¼¾î ³õ°Å³ª ÇßÀ» ¶§¿¡ ¹ß»ýÇÕ´Ï´Ù. l °¡ null ÀÇ °æ¿ì, ¿¹¿Ü´Â ½½·Î¿ì µÇÁö ¾Ê°í ¾×¼ÇÀº ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
l - ¾×¼Ç ûÃëÀÚ
µµÀÔµÈ ¹öÁ¯:
JDK1. 1
°ü·Ã Ç׸ñ:
removeActionListener(java.awt.event.ActionListener) , getActionListeners() , ActionListener

removeActionListener

public void removeActionListener(ActionListener  l)
ÀÌ ¹öưÀ¸·ÎºÎÅÍ ¾×¼Ç À̺¥Æ®¸¦ ¹ÞÁö ¾Ê°Ô, ÁöÁ¤µÈ ¾×¼Ç ûÃëÀÚ¸¦ »èÁ¦ÇÕ´Ï´Ù. ¾×¼Ç À̺¥Æ®´Â À¯Àú°¡ ÀÌ ¹öư À§¿¡¼­ mouse button¸¦ ´©¸£°Å³ª ¶¼¾î ³õ°Å³ª ÇßÀ» ¶§¿¡ ¹ß»ýÇÕ´Ï´Ù. l °¡ null ÀÇ °æ¿ì, ¿¹¿Ü´Â ½½·Î¿ì µÇÁö ¾Ê°í ¾×¼ÇÀº ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
l - ¾×¼Ç ûÃëÀÚ
µµÀÔµÈ ¹öÁ¯:
JDK1. 1
°ü·Ã Ç׸ñ:
addActionListener(java.awt.event.ActionListener) , getActionListeners() , ActionListener

getActionListeners

public ActionListener [] getActionListeners()
ÀÌ ¹öư¿¡ µî·ÏµÇ¾î ¸ðµç ¾×¼Ç ûÃëÀÚÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
ÀÌ ¹öưÀÇ ¸ðµç ActionListener. ¾×¼Ç ûÃëÀÚ°¡ ÇöÀç µî·ÏµÇÁö ¾ÊÀº °æ¿ì´Â ÇÏ´ÃÀÇ ¹è¿­À» µ¹·ÁÁÖ´Â
µµÀÔµÈ ¹öÁ¯:
1.4
°ü·Ã Ç׸ñ:
addActionListener(java.awt.event.ActionListener) , removeActionListener(java.awt.event.ActionListener) , ActionListener

getListeners

public EventListener [] getListeners(Class  listenerType)
ÀÌ Button ¿¡ FooListener ·Î¼­ ÇöÀç µî·ÏµÇ¾î ¸ðµç ¿ÀºêÁ§Æ®ÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù. ÀÌ FooListener ´Â addFooListener ¸Þ¼Òµå·Î µî·ÏµÈ °ÍÀÔ´Ï´Ù.

listenerType Àμö´Â FooListener.class ¿Í °°Àº Ŭ·¡½º ¸®ÅÍ·²·Î ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î, ÀÌ ¾×¼Ç ûÃëÀÚ¿¡ ´ëÇÑ Button b ÀÇ Á¶È¸´Â ´ÙÀ½ÀÇ ÄÚµå·Î ½Ç½ÃÇÕ´Ï´Ù.

ActionListener[] als = (ActionListener[])(b.getListeners(ActionListener.class));
ÀÌ·¯ÇÑ Ã»ÃëÀÚ°¡ ¾ø´Â °æ¿ì´Â ÇÏ´ÃÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ getListeners
ÆÄ¶ó¹ÌÅÍ:
listenerType - ¿ä±¸µÇ´Â ûÃëÀÚÀÇ Å¸ÀÔ. java.util.EventListener ÀÇ ÇÏÀ§ ÀÎÅÍÆäÀ̽º¸¦ ÁöÁ¤
¹Ýȯ°ª:
ÀÌ ¹öư¿¡ FooListener ·Î¼­ µî·ÏµÇ¾î ¸ðµç ¿ÀºêÁ§Æ®ÀÇ ¹è¿­. ûÃëÀÚ°¡ µî·ÏµÇÁö ¾ÊÀº °æ¿ì´Â ÇÏ´ÃÀÇ ¹è¿­À» µ¹·ÁÁØ´Ù
¿¹¿Ü:
ClassCastException - if listenerType °¡ java.util.EventListener ¸¦ ±¸ÇöÇϴ Ŭ·¡½º ¶Ç´Â ÀÎÅÍÆäÀ̽º¸¦ ÁöÁ¤ÇÏÁö ¾Ê´Â °æ¿ì
µµÀÔµÈ ¹öÁ¯:
1.3
°ü·Ã Ç׸ñ:
getActionListeners()

processEvent

protected void processEvent(AWTEvent  e)
ÀÌ ¹öư¿¡ °üÇÑ À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù. À̺¥Æ®°¡ ActionEvent ÀÇ ÀνºÅϽºÀÎ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â processActionEvent ¸Þ¼Òµå¸¦ È£ÃâÇÕ´Ï´Ù. ±×·¸Áö ¾ÊÀº °æ¿ì´Â ½´ÆÛ Ŭ·¡½ºÀÇ processEvent ¸¦ È£ÃâÇÕ´Ï´Ù.

À̺¥Æ® ÆÄ¶ó¹ÌÅͰ¡ null ÀÇ °æ¿ìÀÇ µ¿ÀÛÀº Á¤ÀǵǾî ÀÖÁö ¾Ê±â ¶§¹®¿¡ ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ processEvent
ÆÄ¶ó¹ÌÅÍ:
e - À̺¥Æ®
µµÀÔµÈ ¹öÁ¯:
JDK1. 1
°ü·Ã Ç׸ñ:
ActionEvent , processActionEvent(java.awt.event.ActionEvent)

processActionEvent

protected void processActionEvent(ActionEvent  e)
ÀÌ ¹öưÀ¸·Î ¹ß»ýÇÏ´Â ¾×¼Ç À̺¥Æ®¸¦, µî·ÏµÇ¾î ÀÖ´Â ActionListener ¿ÀºêÁ§Æ®¿¡ µð½ºÆÌÄ¡ ÇÏ´Â °ÍÀ¸·Î½á, ¾×¼Ç À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù.

ÀÌ ¹öư¿¡ ´ëÇØ¼­ ¾×¼Ç À̺¥Æ®°¡ »ç¿ë °¡´ÉÇÏÁö ¾ÊÀº °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ºÒ·Á °¡Áö ¾Ê½À´Ï´Ù. ¾×¼Ç À̺¥Æ®´Â ´ÙÀ½ÀÇ ¾î¶² °ÍÀΰ¡ÀÇ °æ¿ì¿¡ »ç¿ë °¡´ÉÇÏ°Ô µË´Ï´Ù.

À̺¥Æ® ÆÄ¶ó¹ÌÅͰ¡ null ÀÇ °æ¿ìÀÇ µ¿ÀÛÀº Á¤ÀǵǾî ÀÖÁö ¾Ê±â ¶§¹®¿¡ ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
e - ¾×¼Ç À̺¥Æ®
µµÀÔµÈ ¹öÁ¯:
JDK1. 1
°ü·Ã Ç׸ñ:
ActionListener , addActionListener(java.awt.event.ActionListener) , Component.enableEvents(long)

paramString

protected String  paramString()
ÀÌ Button »óŸ¦ ³ªÅ¸³»´Â ij¸¯ÅÍ ¶óÀÎÀ» µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â µð¹ö±× Àü¿ëÀ̸ç, µ¹·ÁÁÖ¾îÁö´Â ij¸¯ÅÍ ¶óÀÎÀÇ ³»¿ë ¹× Çü½ÄÀº ±¸Çö¿¡ µû¶ó¼­ ´Ù¸¨´Ï´Ù. µ¹·ÁÁÖ¾îÁö´Â ij¸¯ÅÍ ¶óÀÎÀº °ø¹éÀÇ °æ¿ì°¡ ÀÖ½À´Ï´Ù¸¸,null ·Î´Â µÇÁö ¾Ê½À´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ paramString
¹Ýȯ°ª:
ÀÌ ¹öưÀÇ ÆÄ¶ó¹ÌÅÍ Ä³¸¯ÅÍ ¶óÀÎ

getAccessibleContext

public AccessibleContext  getAccessibleContext()
ÀÌ Button ¿¡ °ü·ÃÁöÀ» ¼ö ÀÖ´Â AccessibleContext ¸¦ ÃëµæÇÕ´Ï´Ù. AccessibleContext ´Â ¹öưÀÇ ÆûÀ» AccessibleAWTButton ·ÎºÎÅÍ ÃëµæÇÕ´Ï´Ù. ÇÊ¿äÇÑ °æ¿ì´Â »õ·Î¿î AccessibleAWTButton ÀνºÅϽº¸¦ »ý¼ºÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º Accessible ³»ÀÇ getAccessibleContext
¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ getAccessibleContext
¹Ýȯ°ª:
ÀÌ Button ÀÇ AccessibleContext ·Î¼­ ±â´ÉÇÏ´Â AccessibleAWTButton

JavaTM 2
Platform
Std.  Ed.  v1. 4.0

¹ö±×ÀÇ º¸°í¿Í ±â´ÉÀÇ ¸®Äù½ºÆ®
ÀÌ¿ÜÀÇ API ·¹ÆÛ·±½º ¹× °³¹ßÀÚ¿ë ¹®¼­¿¡ ´ëÇØ¼­´Â Java 2 SDK SE °³¹ßÀÚ¿ë ¹®¼­¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä. °³¹ßÀÚÀü¿ëÀÇ »ó¼¼ÇÑ ÇØ¼³, °³³äÀÇ °³¿ä, ¿ë¾îÀÇ Á¤ÀÇ, ¹ö±×ÀÇ È¸ÇÇÃ¥, ¹× ÄÚµå ½Ç·Ê°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.

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.