Java Interfaces
since July 1, 1999 July 1, 1999, working


Java Interfaces

JavaÀÇ Interfaces¶õ Java Language°¡ Multplue Inheritance¸¦ Áö¿øÇÏÁö ¾Ê´Â ÀÌÀ¯·Î (Multiple Inheritance´Â ¿©·¯°¡Áö ¹®Á¦¸¦ ÀÏÀ¸Å³¼ö ÀÖ´Ù.) member varialbeÀº °¡Áö°í ÀÖÁö ¾Ê°í Method ¸¸À» °¡Áø ÀÏÁ¾ÀÇ Æ¯¼ö ClassÀÎ Interface¸¦ ÀÌ¿ëÇÏ¿© Method¸¦ º¹¼ö°³ÀÇ Super class¿¡¼­ Inheritance¹Þ±â À§ÇØ ¸¸µé¾î³½ MechanismÀÌ´Ù.

Á¾·ù·Î´Â ´ÙÀ½°ú °°Àº Interfaces°¡ ÀÖ´Ù.

interfaces description listener event detact
ActionListener Control(eg. button or menu)ÀÌ ´­·ÁÁ³´ÂÁö °¨½Ã actionPerformed() ActionEvent.getSource() == control_name
MouseListener MouseÀÇ ´©¸§°ú ³õÀ½, Applet ³»¿Ü·ÎÀÇ À̵¿À» °¨½Ã mousePressed()
mouseReleased()
mouseDragged()
mouseClicked()
mouseEntered()
mouseMoved()
MouseEvent.getX() = x postion of mouse click (c.f getY())
KeyPressed Key board ÀÔ·Â °¨½Ã
ItemListener check box, radio button controlÀÇ ¼±Åà º¯°æÀ» °¨½Ã itemStateChanged() ItemEvent.getItemSelectable() == check_box_name
AdjustmentListener scroll barÀÇ ¿òÁ÷ÀÓÀ» °¨½Ã adjustmentValueChanged() AdjustmentEvent.getAdjustable()== scroll_name
runnable Thread »ç¿ë



Knowledge and Engineering Databases © copyright Namchul Do, 1999