JavaTM 2
Platform
Std.  Ed.  v1. 4.0

javax.swing
Ŭ·¡½º JPopupMenu

java.lang.Object 
  |
  +--java.awt.Component 
        |
        +--java.awt.Container 
              |
              +--javax.swing.JComponent 
                    |
                    +--javax.swing.JPopupMenu
¸ðµç ±¸Çö ÀÎÅÍÆäÀ̽º:
Accessible , ImageObserver , MenuContainer , MenuElement , Serializable
Á÷°èÀÇ ±âÁ¸ÀÇ ¼­ºê Ŭ·¡½º:
BasicComboPopup

public class JPopupMenu
extends JComponent
implements Accessible , MenuElement

pop-up menuÀÇ ±¸ÇöÀÔ´Ï´Ù. pop-up menu´Â ÀÛÀº À©µµ¿ì·Î, º¹¼öÀÇ ¼±ÅûçÇ× (¸Þ´º Ä¿¸àµå)À» Ç¥½ÃÇÕ´Ï´Ù. JPopupMenu ´Â µµ±¸¸ðÀ½»óÀÇ Ç׸ñÀÌ ¼±ÅõǾúÀ» ¶§¿¡ Ç¥½ÃÇÏ´Â ¸Þ´º¿¡ »ç¿ëÇÕ´Ï´Ù. ¶Ç, ¼±ÅÃÇÑ ¸Þ´º Ç׸ñ¿¡ µû¶ó¼­´Â Ç¥½ÃµÇ´Â Àϵµ ÀÖ´Â ÇÁ¸£¶óÀÌÆ®¸Þ´º¿¡µµ »ç¿ëµË´Ï´Ù. ȤÀº ¸Þ´º¸¦ Ç¥½Ã½ÃŰ°í ½ÍÀº ´Ù¸¥ Àå¼Ò (µµ±¸¸ðÀ½ ÀÌ¿ÜÀÇ Àå¼Ò)¿¡¼­µµ,JPopupMenu ¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î, ƯÁ¤ÀÇ Àå¼Ò¿¡¼­ ¿À¸¥ÂÊ Å¬¸¯ÀÌ ¹ß»ýÇßÀ» °æ¿ìÀÇ pop-up menu Ç¥½Ã (¼îÆ® ÄÆ ¸Þ´º) µîÀÔ´Ï´Ù.

pop-up menuÀÇ »ó¼¼¿Í »ç¿ë¿¹¿¡ ´ëÇØ¼­´Â ¡¸The Java Tutorial¡¹ÀÇ¡¸How to Use Menus¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä. Ç¥ÁØÀÇ Look & Feel (L&F) Ç¥ÇöÀ¸·Î ÀÌ ÄÄÆÛ³ÍÆ®°¡ »ç¿ëÇϴ Űº¸µåÀÇ Å°¿¡ ´ëÇØ¼­´Â ¡¸JPopupMenu ÀÇ Å° ÇÒ´çÇÏ°í¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.

°æ°í: ÀÌ Å¬·¡½ºÀÇ Á÷·ÄÈ­ µÈ ¿ÀºêÁ§Æ®´Â ÇâÈÄÀÇ Swing ¸±¸®½º¿Í ȣȯÀº ¾Æ´Ï°Ô µÉ ¿¹Á¤ÀÔ´Ï´Ù. ÇöÀçÀÇ Á÷·ÄÈ­ÀÇ ¼­Æ÷Æ®´Â ´Ü±â°£ÀÇ ¿î¿ëÀ̳ª, °°Àº ¹öÁ¯ÀÇ Swing ¸¦ ½ÇÇàÇÏ´Â ¾îÇø®ÄÉÀ̼ǰ£ÀÇ RMI ¿¡ ÀûÀýÇϰí ÀÖ½À´Ï´Ù. 1.4 ¿¡¼­´Â ¸ðµç JavaBeansTM ÀÇ Àå±â°£ÀÇ ¿î¿ë¿¡ ´ëÇÑ ¼­Æ÷Æ®°¡ java.beans ÆÐŰÁö¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù. XMLEncoder ¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.


ÁßøµÈ Ŭ·¡½ºÀÇ °³¿ä
protected  class JPopupMenu.AccessibleJPopupMenu
          ÀÌ Å¬·¡½º´Â JPopupMenu Ŭ·¡½º¿ëÀÇ À¯Àú º¸Á¶ ±â´ÉÀÇ ¼­Æ÷Æ®¸¦ ±¸ÇöÇϰí ÀÖ½À´Ï´Ù.
static class JPopupMenu.Separator
          pop-up menu °íÀ¯ÀÇ separatorÀÔ´Ï´Ù.
 
Ŭ·¡½º javax.swing. JComponent À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º
 
Ŭ·¡½º java.awt. Container À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º
 
Ŭ·¡½º java.awt. Component À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º
Component.BltBufferStrategy , Component.FlipBufferStrategy
 
ÇʵåÀÇ °³¿ä
 
Ŭ·¡½º javax.swing. JComponent ¿¡¼­ »ó¼Ó¹ÞÀº Çʵå
accessibleContext , listenerList , TOOL_TIP_TEXT_KEY , ui , UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW
 
Ŭ·¡½º 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
 
»ý¼ºÀÚÀÇ °³¿ä
JPopupMenu ()
          È£Ãâ ÄÄÆÛ³ÍÆ®ÀÇ Á¤ÀǾøÀÌ JPopupMenu ¸¦ ±¸ÃàÇÕ´Ï´Ù.
JPopupMenu (String  label)
          ÁöÁ¤µÈ ŸÀÌÆ²ÀÇ PopupMenu ¸¦ ±¸ÃàÇÕ´Ï´Ù.
 
¸Þ¼ÒµåÀÇ °³¿ä
 JMenuItem add (Action  a)
          ÁöÁ¤µÈ Action ¿ÀºêÁ§Æ®¸¦ µð½ºÆÌÄ¡ ÇÏ´Â ¸Þ´ºÀÇ ¸»¹Ì¿¡ »õ·Î¿î ¸Þ´º Ç׸ñÀ» Ãß°¡ÇÕ´Ï´Ù.
 JMenuItem add (JMenuItem  menuItem)
          ÁöÁ¤µÈ ¸Þ´º Ç׸ñÀ» ¸Þ´ºÀÇ ¸»¹Ì¿¡ Ãß°¡ÇÕ´Ï´Ù.
 JMenuItem add (String  s)
          ÁöÁ¤µÈ ÅØ½ºÆ®¸¦ °¡Áö´Â »õ·Î¿î ¸Þ´º Ç׸ñÀ» ÀÛ¼ºÇØ, ÀÌ ¸Þ´ºÀÇ ¸»¹Ì¿¡ Ãß°¡ÇÕ´Ï´Ù.
 void addPopupMenuListener (PopupMenuListener  l)
          PopupMenu ûÃëÀÚ¸¦ Ãß°¡ÇÕ´Ï´Ù.
 void addSeparator ()
          ¸Þ´ºÀÇ ¸»¹Ì¿¡ »õ·Î¿î separator¸¦ Ãß°¡ÇÕ´Ï´Ù.
protected  PropertyChangeListener createActionChangeListener (JMenuItem  b)
          Action ¿¡ ´ëÇÑ º¯°æÀÌ ¹ß»ýÇßÀ» °æ¿ì¿¡ ÄÁÆ®·ÑÀ» °»½ÅÇÑ´Ù, ÀûÀýÈ÷ ¼³Á¤µÈ PropertyChangeListener ¸¦ µ¹·ÁÁÝ´Ï´Ù.
protected  JMenuItem createActionComponent (Action  a)
          JPopupMenu ¿¡ Ãß°¡µÈ Action ÀÇ JMenuItem ¸¦ ÀÛ¼ºÇÏ´Â ÆÑÅ丮 ¸Þ¼ÒµåÀÔ´Ï´Ù.
protected  void firePopupMenuCanceled ()
          PopupMenuListener ¿¡, pop-up menu°¡ »èÁ¦µÈ °ÍÀ» ÅëÁöÇÕ´Ï´Ù.
protected  void firePopupMenuWillBecomeInvisible ()
          PopupMenuListener ¿¡, pop-up menu°¡ ºÒ°¡½Ã°¡ µÇ´Â °ÍÀ» ÅëÁöÇÕ´Ï´Ù.
protected  void firePopupMenuWillBecomeVisible ()
          PopupMenuListener ¿¡, pop-up menu°¡ °¡½Ã°¡ µÇ´Â °ÍÀ» ÅëÁöÇÕ´Ï´Ù.
 AccessibleContext getAccessibleContext ()
          ÀÌ JPopupMenu ¿¡ °ü·ÃÇÑ AccessibleContext ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 Component getComponent ()
          ÀÌ JPopupMenu ÄÄÆÛ³ÍÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù.
 Component getComponentAtIndex (int i)
          Ãßõ µÇ°í ÀÖÁö ¾Ê½À´Ï´Ù.  getComponent(int i) ·Î ¿Å°ÜÁ³½À´Ï´Ù.
 int getComponentIndex (Component  c)
          ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ À妽º¸¦ µ¹·ÁÁÝ´Ï´Ù.
static boolean getDefaultLightWeightPopupEnabled ()
          defaultLightWeightPopupEnabled ÇÁ·ÎÆÛƼ¸¦ ÃëµæÇÕ´Ï´Ù.
 Component getInvoker ()
          pop-up menuÀÇ È£Ãâ ÄÄÆÛ³ÍÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù.
 String getLabel ()
          pop-up menuÀÇ label¸¦ µ¹·ÁÁÝ´Ï´Ù.
 Insets getMargin ()
          pop-up menuÀÇ º¸´õ¿Í ³»¿ëÀÇ »çÀÌ¿¡ ÀÖ´Â ¸¶ÁøÀÇ °ªÀ» µ¹·ÁÁÝ´Ï´Ù (Çȼ¿ ´ÜÀ§).
 PopupMenuListener [] getPopupMenuListeners ()
          ÀÌ JMenuItem ¿¡ addPopupMenuListener()·Î Ãß°¡µÈ ¸ðµç PopupMenuListener ÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.
 SingleSelectionModel getSelectionModel ()
          ´ÜÀÏÀÇ ¼±ÅÃÀ» Ãë±ÞÇÏ´Â ¸ðµ¨ ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù.
 MenuElement [] getSubElements ()
          ÀÌ ¸Þ´º ÄÄÆÛ³ÍÆ®ÀÇ ºÎ¸Þ´º¸¦ ÀúÀåÇÏ´Â MenuElement ÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.
 PopupMenuUI getUI ()
          ÀÌ ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â Look & Feel (L&F) ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù.
 String getUIClassID ()
          ÀÌ ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â L&F Ŭ·¡½ºÀÇ À̸§À» µ¹·ÁÁÝ´Ï´Ù.
 void insert (Action  a, int index)
          ÁöÁ¤µÈ Action ¿ÀºêÁ§Æ®¸¦, ¸Þ´º Ç׸ñÀ¸·Î¼­ ÁöÁ¤ÀÇ À§Ä¡¿¡ »ðÀÔÇÕ´Ï´Ù.
 void insert (Component  component, int index)
          ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®¸¦, ¸Þ´ºÀÇ ÁöÁ¤µÈ À§Ä¡¿¡ »ðÀÔÇÕ´Ï´Ù.
 boolean isBorderPainted ()
          º¸´õ¸¦ paint ÇÒÁö ¾î¶³Áö¸¦ Á¶»çÇÕ´Ï´Ù.
 boolean isLightWeightPopupEnabled ()
          lightWeightPopupEnabled ÇÁ·ÎÆÛƼ¸¦ ÃëµæÇÕ´Ï´Ù.
 boolean isPopupTrigger (MouseEvent  e)
          JPopupMenu ÀÇ ÇöÀç ÀνºÅç µÇ°í ÀÖ´Â UI °¡ MouseEvent ¸¦ pop-up ¹æ¾Æ¼è¶ó°í º¸´Â °æ¿ì´Â true ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 boolean isVisible ()
          pop-up menu°¡ °¡½Ã (ÇöÀç Ç¥½ÃÁß)ÀÎ °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 void menuSelectionChanged (boolean isIncluded)
          ÀÌ ¸Þ´º¸¦ ¾×ƼºêÇÏ°Ô ÇÏ´ÂÁö ¾×ƼºêÇÏÁö ¾Ê°Ô Çϱâ À§Çؼ­ µµ±¸¸ðÀ½ÀÇ ¼±ÅÃÀÌ º¯°æµÇ¾úÀ» ¶§¿¡, ¸Þ¼¼Áö¸¦ º¸³À´Ï´Ù.
 void pack ()
          ÄÁÅ×À̳ʸ¦ ·¹À̾ƿô ÇØ, ³»¿ëÀÇ Ç¥½Ã¿¡ ÃÖ¼ÒÇÑÀÇ °ø°£À» »ç¿ëÇϵµ·Ï(µíÀÌ) ÇÕ´Ï´Ù.
protected  void paintBorder (Graphics  g)
          borderPainted ÇÁ·ÎÆÛƼ°¡ true ÀÎ °æ¿ì¿¡, pop-up menuÀÇ º¸´õ¸¦ paint ÇÕ´Ï´Ù.
protected  String paramString ()
          ÀÌ JPopupMenu ÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇöÀ» µ¹·ÁÁÝ´Ï´Ù.
protected  void processFocusEvent (FocusEvent  evt)
          ÀÌ ÄÄÆÛ³ÍÆ®·Î ¹ß»ýÇÏ´Â Æ÷Ä¿½º À̺¥Æ®¸¦, µî·ÏµÇ¾î ¸ðµç FocusListener ¿ÀºêÁ§Æ®¿¡ µð½ºÆÌÄ¡ ÇÏ´Â °ÍÀ¸·Î½á ó¸®ÇÕ´Ï´Ù.
protected  void processKeyEvent (KeyEvent  evt)
          ¹«¸­ °üÀý ¸ð´ÖÅ©³ª °¡¼Ó±âµîÀÇ, Ű½ºÆ®·ÎÅ©(keystroke) À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù.
 void processKeyEvent (KeyEvent  e, MenuElement [] path, MenuSelectionManager  manager)
          ÀÌ ¸Þ¼Òµå´Â MenuElement ÀÎÅÍÆäÀ̽º¿¡ ÀûÇÕÇϱâ À§Çؼ­ ÇÊ¿äÇÕ´Ï´Ù¸¸, ±¸ÇöµÇ°í ÀÖÁö ¾Ê½À´Ï´Ù.
 void processMouseEvent (MouseEvent  event, MenuElement [] path, MenuSelectionManager  manager)
          ÀÌ ¸Þ¼Òµå´Â MenuElement ÀÎÅÍÆäÀ̽º¿¡ ÀûÇÕÇϱâ À§Çؼ­ ÇÊ¿äÇÕ´Ï´Ù¸¸, ±¸ÇöµÇ°í ÀÖÁö ¾Ê½À´Ï´Ù.
 void remove (int pos)
          ÁöÁ¤µÈ À妽º¿¡ ÀÖ´Â ÄÄÆÛ³ÍÆ®¸¦ ÀÌ pop-up menu·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù.
 void removePopupMenuListener (PopupMenuListener  l)
          PopupMenu ûÃëÀÚ¸¦ »èÁ¦ÇÕ´Ï´Ù.
 void setBorderPainted (boolean b)
          º¸´õ¸¦ paint ÇÒÁö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù.
static void setDefaultLightWeightPopupEnabled (boolean aFlag)
          lightWeightPopupEnabled ÇÁ·ÎÆÛƼÀÇ µðÆúÆ® °ª¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setInvoker (Component  invoker)
          pop-up menuÀÇ È£Ãâ ÄÄÆÛ³ÍÆ®, Áï, pop-up menu Ç׸ñÀÌ Ç¥½ÃµÇ´Â ÄÄÆÛ³ÍÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setLabel (String  label)
          pop-up menuÀÇ label¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setLightWeightPopupEnabled (boolean aFlag)
          lightWeightPopupEnabled ÀÇ µðÆúÆ® °ª¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setLocation (int x, int y)
          x, y ÁÂÇ¥¸¦ »ç¿ëÇØ, pop-up menuÀÇ Á»󱸼®ÀÇ À§Ä¡¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setPopupSize (Dimension  d)
          Dimension ¿ÀºêÁ§Æ®¸¦ »ç¿ëÇØ, pop-up À©µµ¿ìÀÇ »çÀÌÁ ¼³Á¤ÇÕ´Ï´Ù.
 void setPopupSize (int width, int height)
          pop-up À©µµ¿ìÀÇ »çÀÌÁ, ÁöÁ¤µÈ Æø ¹× ³ôÀÌ·Î ¼³Á¤ÇÕ´Ï´Ù.
 void setSelected (Component  sel)
          ÇöÀç ¼±ÅõǴ ÄÄÆÛ³ÍÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setSelectionModel (SingleSelectionModel  model)
          ´ÜÀÏÀÇ ¼±ÅÃÀ» Ãë±ÞÇÏ´Â ¸ðµ¨ ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setUI (PopupMenuUI  ui)
          ÀÌ ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â L&F ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setVisible (boolean b)
          pop-up menuÀÇ °¡½Ã¼ºÀ» ¼³Á¤ÇÕ´Ï´Ù.
 void show (Component  invoker, int x, int y)
          È£Ãâ ÄÄÆÛ³ÍÆ®³»ÀÇ x, y ÁÂÇ¥·Î ÁöÁ¤µÈ À§Ä¡¿¡, pop-up menu¸¦ Ç¥½ÃÇÕ´Ï´Ù.
 void updateUI ()
          ÇöÀçÀÇ Look & Feel ·ÎºÎÅÍÀÇ °ª¿¡ UI ÇÁ·ÎÆÛƼ¸¦ ¸®¼ÂÆ® ÇÕ´Ï´Ù.
 
Ŭ·¡½º javax.swing. JComponent ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
addAncestorListener , addNotify , addPropertyChangeListener , addPropertyChangeListener , addVetoableChangeListener , computeVisibleRect , contains , createToolTip , disable , enable , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , fireVetoableChange , getActionForKeyStroke , getActionMap , getAlignmentX , getAlignmentY , getAncestorListeners , getAutoscrolls , getBorder , getBounds , getClientProperty , getComponentGraphics , getConditionForKeyStroke , getDebugGraphicsOptions , getDefaultLocale , getGraphics , getHeight , getInputMap , getInputMap , getInputVerifier , getInsets , getInsets , getListeners , getLocation , getMaximumSize , getMinimumSize , getNextFocusableComponent , getPreferredSize , getPropertyChangeListeners , getPropertyChangeListeners , getRegisteredKeyStrokes , getRootPane , getSize , getToolTipLocation , getToolTipText , getToolTipText , getTopLevelAncestor , getTransferHandler , getVerifyInputWhenFocusTarget , getVetoableChangeListeners , getVisibleRect , getWidth , getX , getY , grabFocus , isDoubleBuffered , isLightweightComponent , isManagingFocus , isMaximumSizeSet , isMinimumSizeSet , isOpaque , isOptimizedDrawingEnabled , isPaintingTile , isPreferredSizeSet , isRequestFocusEnabled , isValidateRoot , paint , paintChildren , paintComponent , paintImmediately , paintImmediately , print , printAll , printBorder , printChildren , printComponent , processComponentKeyEvent , processKeyBinding , processMouseMotionEvent , putClientProperty , registerKeyboardAction , registerKeyboardAction , removeAncestorListener , removeNotify , removePropertyChangeListener , removePropertyChangeListener , removeVetoableChangeListener , repaint , repaint , requestDefaultFocus , requestFocus , requestFocus , requestFocusInWindow , requestFocusInWindow , resetKeyboardActions , reshape , revalidate , scrollRectToVisible , setActionMap , setAlignmentX , setAlignmentY , setAutoscrolls , setBackground , setBorder , setDebugGraphicsOptions , setDefaultLocale , setDoubleBuffered , setEnabled , setFont , setForeground , setInputMap , setInputVerifier , setMaximumSize , setMinimumSize , setNextFocusableComponent , setOpaque , setPreferredSize , setRequestFocusEnabled , setToolTipText , setTransferHandler , setUI , setVerifyInputWhenFocusTarget , unregisterKeyboardAction , update
 
Ŭ·¡½º java.awt. Container ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
add , add , add , add , add , addContainerListener , addImpl , applyComponentOrientation , areFocusTraversalKeysSet , countComponents , deliverEvent , doLayout , findComponentAt , findComponentAt , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getContainerListeners , getFocusTraversalKeys , getFocusTraversalPolicy , getLayout , insets , invalidate , isAncestorOf , isFocusCycleRoot , isFocusCycleRoot , isFocusTraversalPolicySet , layout , list , list , locate , minimumSize , paintComponents , preferredSize , printComponents , processContainerEvent , processEvent , remove , removeAll , removeContainerListener , setFocusCycleRoot , setFocusTraversalKeys , setFocusTraversalPolicy , setLayout , transferFocusBackward , transferFocusDownCycle , validate , validateTree
 
Ŭ·¡½º java.awt. Component ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
action , add , addComponentListener , addFocusListener , addHierarchyBoundsListener , addHierarchyListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addMouseWheelListener , bounds , checkImage , checkImage , coalesceEvents , contains , createImage , createImage , createVolatileImage , createVolatileImage , disableEvents , dispatchEvent , enable , enableEvents , enableInputMethods , getBackground , getBounds , getColorModel , getComponentListeners , getComponentOrientation , getCursor , getDropTarget , getFocusCycleRootAncestor , getFocusListeners , getFocusTraversalKeysEnabled , getFont , getFontMetrics , getForeground , getGraphicsConfiguration , getHierarchyBoundsListeners , getHierarchyListeners , getIgnoreRepaint , getInputContext , getInputMethodListeners , getInputMethodRequests , getKeyListeners , getLocale , getLocation , getLocationOnScreen , getMouseListeners , getMouseMotionListeners , getMouseWheelListeners , getName , getParent , getPeer , getSize , getToolkit , getTreeLock , gotFocus , handleEvent , hasFocus , hide , imageUpdate , inside , isBackgroundSet , isCursorSet , isDisplayable , isEnabled , isFocusable , isFocusOwner , isFocusTraversable , isFontSet , isForegroundSet , isLightweight , isShowing , isValid , keyDown , keyUp , list , list , list , location , lostFocus , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paintAll , postEvent , prepareImage , prepareImage , processComponentEvent , processHierarchyBoundsEvent , processHierarchyEvent , processInputMethodEvent , processMouseEvent , processMouseWheelEvent , remove , removeComponentListener , removeFocusListener , removeHierarchyBoundsListener , removeHierarchyListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removeMouseWheelListener , repaint , repaint , repaint , resize , resize , setBounds , setBounds , setComponentOrientation , setCursor , setDropTarget , setFocusable , setFocusTraversalKeysEnabled , setIgnoreRepaint , setLocale , setLocation , setName , setSize , setSize , show , show , size , toString , transferFocus , transferFocusUpCycle
 
Ŭ·¡½º java.lang. Object ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

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

JPopupMenu

public JPopupMenu()
È£Ãâ ÄÄÆÛ³ÍÆ®ÀÇ Á¤ÀǾøÀÌ JPopupMenu ¸¦ ±¸ÃàÇÕ´Ï´Ù.


JPopupMenu

public JPopupMenu(String  label)
ÁöÁ¤µÈ ŸÀÌÆ²ÀÇ PopupMenu ¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
label - pop-up menuÀÇ Å¸ÀÌÆ²·Î¼­ UI °¡ »ç¿ëÇϴ ij¸¯ÅÍ ¶óÀÎ
¸Þ¼ÒµåÀÇ »ó¼¼

setDefaultLightWeightPopupEnabled

public static void setDefaultLightWeightPopupEnabled(boolean aFlag)
lightWeightPopupEnabled ÇÁ·ÎÆÛƼÀÇ µðÆúÆ® °ª¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
aFlag - pop-up°¡ °æ·®ÀÇ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
getDefaultLightWeightPopupEnabled() , setLightWeightPopupEnabled(boolean)

getDefaultLightWeightPopupEnabled

public static boolean getDefaultLightWeightPopupEnabled()
defaultLightWeightPopupEnabled ÇÁ·ÎÆÛƼ¸¦ ÃëµæÇÕ´Ï´Ù. µðÆúÆ®¿¡¼­´Â true ÀÔ´Ï´Ù.

¹Ýȯ°ª:
defaultLightWeightPopupEnabled ÇÁ·ÎÆÛƼÀÇ °ª
°ü·Ã Ç׸ñ:
setDefaultLightWeightPopupEnabled(boolean)

getUI

public PopupMenuUI  getUI()
ÀÌ ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â Look & Feel (L&F) ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â PopupMenuUI ¿ÀºêÁ§Æ®

setUI

public void setUI(PopupMenuUI  ui)
ÀÌ ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â L&F ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
ui - ½Å±Ô PopupMenuUI L&F ¿ÀºêÁ§Æ®
°ü·Ã Ç׸ñ:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
ÇöÀçÀÇ Look & Feel ·ÎºÎÅÍÀÇ °ª¿¡ UI ÇÁ·ÎÆÛƼ¸¦ ¸®¼ÂÆ® ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º JComponent ³»ÀÇ updateUI
°ü·Ã Ç׸ñ:
JComponent.updateUI()

getUIClassID

public String  getUIClassID()
ÀÌ ÄÄÆÛ³ÍÆ®¸¦ Ç¥Çö ÇÏ´Â L&F Ŭ·¡½ºÀÇ À̸§À» µ¹·ÁÁÝ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º JComponent ³»ÀÇ getUIClassID
¹Ýȯ°ª:
ij¸¯ÅÍ ¶óÀÎ ¡¸PopupMenuUI¡¹
°ü·Ã Ç׸ñ:
JComponent.getUIClassID() , UIDefaults.getUI(javax.swing.JComponent)

processFocusEvent

protected void processFocusEvent(FocusEvent  evt)
Ŭ·¡½º Component ÀÇ ±â¼ú:
ÀÌ ÄÄÆÛ³ÍÆ®·Î ¹ß»ýÇÏ´Â Æ÷Ä¿½º À̺¥Æ®¸¦, µî·ÏµÇ¾î ¸ðµç FocusListener ¿ÀºêÁ§Æ®¿¡ µð½ºÆÌÄ¡ ÇÏ´Â °ÍÀ¸·Î½á ó¸®ÇÕ´Ï´Ù.

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

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

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ processFocusEvent
ÆÄ¶ó¹ÌÅÍ:
evt - Æ÷Ä¿½º À̺¥Æ®
°ü·Ã Ç׸ñ:
FocusEvent , FocusListener , Component.addFocusListener(java.awt.event.FocusListener) , Component.enableEvents(long)

processKeyEvent

protected void processKeyEvent(KeyEvent  evt)
¹«¸­ °üÀý ¸ð´ÖÅ©³ª °¡¼Ó±âµîÀÇ, Ű½ºÆ®·ÎÅ©(keystroke) À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º JComponent ³»ÀÇ processKeyEvent
ÆÄ¶ó¹ÌÅÍ:
evt - ó¸®µÇ´Â Ű À̺¥Æ®
°ü·Ã Ç׸ñ:
KeyEvent , KeyListener , Component.addKeyListener(java.awt.event.KeyListener) , Component.enableEvents(long) , Component.isShowing()

getSelectionModel

public SingleSelectionModel  getSelectionModel()
´ÜÀÏÀÇ ¼±ÅÃÀ» Ãë±ÞÇÏ´Â ¸ðµ¨ ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
selectionModel ÇÁ·ÎÆÛƼ
°ü·Ã Ç׸ñ:
SingleSelectionModel

setSelectionModel

public void setSelectionModel(SingleSelectionModel  model)
´ÜÀÏÀÇ ¼±ÅÃÀ» Ãë±ÞÇÏ´Â ¸ðµ¨ ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
model - ½Å±Ô SingleSelectionModel
°ü·Ã Ç׸ñ:
SingleSelectionModel

add

public JMenuItem  add(JMenuItem  menuItem)
ÁöÁ¤µÈ ¸Þ´º Ç׸ñÀ» ¸Þ´ºÀÇ ¸»¹Ì¿¡ Ãß°¡ÇÕ´Ï´Ù.

¹Ýȯ°ª:
Ãß°¡µÈ JMenuItem

add

public JMenuItem  add(String  s)
ÁöÁ¤µÈ ÅØ½ºÆ®¸¦ °¡Áö´Â »õ·Î¿î ¸Þ´º Ç׸ñÀ» ÀÛ¼ºÇØ, ÀÌ ¸Þ´ºÀÇ ¸»¹Ì¿¡ Ãß°¡ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
s - Ãß°¡µÇ´Â ¸Þ´º Ç׸ñÀÇ Ä³¸¯ÅÍ ¶óÀÎ

add

public JMenuItem  add(Action  a)
ÁöÁ¤µÈ Action ¿ÀºêÁ§Æ®¸¦ µð½ºÆÌÄ¡ ÇÏ´Â ¸Þ´ºÀÇ ¸»¹Ì¿¡ »õ·Î¿î ¸Þ´º Ç׸ñÀ» Ãß°¡ÇÕ´Ï´Ù. JDK 1.3 ÀÌÈÄ´Â ÀÌ ¸Þ¼Òµå´Â ÄÁÅ×À̳ʿ¡ Action ¸¦ Ãß°¡ÇÏ´Â ¸Þ¼Òµå·Î¼­´Â Ãßõ µÇÁö ¾Ê½À´Ï´Ù. ´ë½Å¿¡,setAction ¸¦ »ç¿ëÇØ ¾×¼ÇÀ» °¡Áö´Â ÄÁÆ®·ÑÀ» ¼³Á¤ÇØ, ±× ÄÁÆ®·ÑÀ» Á÷Á¢ Container ¿¡ Ãß°¡ÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
a - ¸Þ´º¿¡ Ãß°¡ÇÏ´Â Action
¹Ýȯ°ª:
»õ·Î¿î ¸Þ´º Ç׸ñ
°ü·Ã Ç׸ñ:
Action

createActionComponent

protected JMenuItem  createActionComponent(Action  a)
JPopupMenu ¿¡ Ãß°¡µÈ Action ÀÇ JMenuItem ¸¦ ÀÛ¼ºÇÏ´Â ÆÑÅ丮 ¸Þ¼ÒµåÀÔ´Ï´Ù. JDK 1.3 ÀÌÈÄ´Â ÀÌ ¸Þ¼Òµå´Â Ãßõ µÇÁö ¾Ê½À´Ï´Ù. ´ë½Å¿¡,setAction ¸¦ »ç¿ëÇØ ¾×¼ÇÀ» °¡Áö´Â ÄÁÆ®·ÑÀ» ¼³Á¤ÇØ, ±× ÄÁÆ®·ÑÀ» Á÷Á¢ Container ¿¡ Ãß°¡ÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
a - Ãß°¡µÇ´Â ¸Þ´º Ç׸ñÀÇ Action
¹Ýȯ°ª:
»õ·Î¿î ¸Þ´º Ç׸ñ
µµÀÔµÈ ¹öÁ¯:
1.3
°ü·Ã Ç׸ñ:
Action

createActionChangeListener

protected PropertyChangeListener  createActionChangeListener(JMenuItem  b)
Action ¿¡ ´ëÇÑ º¯°æÀÌ ¹ß»ýÇßÀ» °æ¿ì¿¡ ÄÁÆ®·ÑÀ» °»½ÅÇÑ´Ù, ÀûÀýÈ÷ ¼³Á¤µÈ PropertyChangeListener ¸¦ µ¹·ÁÁÝ´Ï´Ù. JDK 1.3 ÀÌÈÄ´Â ÀÌ ¸Þ¼Òµå´Â ÄÁÅ×À̳ʿ¡ Action ¸¦ Ãß°¡ÇÏ´Â ¸Þ¼Òµå·Î¼­´Â Ãßõ µÇÁö ¾Ê½À´Ï´Ù. ´ë½Å¿¡,setAction ¸¦ »ç¿ëÇØ ¾×¼ÇÀ» °¡Áö´Â ÄÁÆ®·ÑÀ» ¼³Á¤ÇØ, ±× ÄÁÆ®·ÑÀ» Á÷Á¢ Container ¿¡ Ãß°¡ÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.


remove

public void remove(int pos)
ÁöÁ¤µÈ À妽º¿¡ ÀÖ´Â ÄÄÆÛ³ÍÆ®¸¦ ÀÌ pop-up menu·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Container ³»ÀÇ remove
ÆÄ¶ó¹ÌÅÍ:
pos - »èÁ¦µÇ´Â Ç׸ñÀÇ À§Ä¡
¿¹¿Ü:
IllegalArgumentException - pos ÀÇ °ªÀÌ 0 º¸´Ù ÀÛÀºÁö pos ÀÇ °ªÀÌ ¸Þ´º Ç׸ñÀÇ ¼öº¸´Ù Å« °æ¿ì
°ü·Ã Ç׸ñ:
Container.add(java.awt.Component)

setLightWeightPopupEnabled

public void setLightWeightPopupEnabled(boolean aFlag)
lightWeightPopupEnabled ÀÇ µðÆúÆ® °ª¸¦ ¼³Á¤ÇÕ´Ï´Ù. µðÆúÆ®¿¡¼­´Â true ÀÔ´Ï´Ù. Look & Feel °¡ pop-up¸¦ Ç¥½ÃÇÒ ¶§, µðÆúÆ®¿¡¼­´Â °æ·® (¸ðµÎ Java ÀÇ) pop-upÀÇ »ç¿ëÀ» ¼±ÅÃÇÒ ¼ö ÀÖ½À´Ï´Ù. °æ·® pop-up À©µµ¿ì´Â Áß·® (³×ÀÌÆ¼ºê ÇǾîÀÇ) À©µµ¿ìº¸´Ù È¿À²ÀûÀÔ´Ï´Ù¸¸, °æ·® ÄÄÆÛ³ÍÆ®¿Í Áß·® ÄÄÆÛ³ÍÆ®¸¦ GUI Áß(¾È)¿¡¼­ È¥Àç½ÃÄѼ­´Â ¾ÈµË´Ï´Ù. ¾îÇø®ÄÉÀ̼ÇÀ¸·Î °æ·® ÄÄÆÛ³ÍÆ®¿Í Áß·® ÄÄÆÛ³ÍÆ®°¡ È¥ÀçÇϰí ÀÖ´Â °æ¿ì´Â °æ·® pop-up¸¦ ¹«È¿·Î ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ ÇÁ·ÎÆÛƼÀÇ °ª¿¡ °ü°è¾øÀÌ, Ç×»ó Áß·® pop-up¸¦ »ç¿ëÇÏ´Â Look & Feel µµ ÀÖ½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
aFlag - °æ·® pop-up¸¦ ¹«È¿·Î ÇÏ´Â °æ¿ì´Â false
°ü·Ã Ç׸ñ:
isLightWeightPopupEnabled

isLightWeightPopupEnabled

public boolean isLightWeightPopupEnabled()
lightWeightPopupEnabled ÇÁ·ÎÆÛƼ¸¦ ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
lightWeightPopupEnabled ÇÁ·ÎÆÛƼÀÇ °ª
°ü·Ã Ç׸ñ:
setLightWeightPopupEnabled(boolean)

getLabel

public String  getLabel()
pop-up menuÀÇ label¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
pop-up menuÀÇ label°¡ ÀúÀåµÇ°í Àִ ij¸¯ÅÍ ¶óÀÎ
°ü·Ã Ç׸ñ:
setLabel(java.lang.String)

setLabel

public void setLabel(String  label)
pop-up menuÀÇ label¸¦ ¼³Á¤ÇÕ´Ï´Ù. Look & Feel ÀÇ ±¸Çö¿¡ ÀÀÇØ, label¸¦ Ç¥½ÃÇÒÁö ¾î¶³Áö ¼±ÅÃÇØµµ ±¦Âú½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
label - pop-up menuÀÇ label¸¦ ÁöÁ¤Çϴ ij¸¯ÅÍ ¶óÀÎ
°ü·Ã Ç׸ñ:
setLabel(java.lang.String)

addSeparator

public void addSeparator()
¸Þ´ºÀÇ ¸»¹Ì¿¡ »õ·Î¿î separator¸¦ Ãß°¡ÇÕ´Ï´Ù.


insert

public void insert(Action  a,
                   int index)
ÁöÁ¤µÈ Action ¿ÀºêÁ§Æ®¸¦, ¸Þ´º Ç׸ñÀ¸·Î¼­ ÁöÁ¤ÀÇ À§Ä¡¿¡ »ðÀÔÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
a - »ðÀÔÇÏ´Â Action ¿ÀºêÁ§Æ®
index - Action ¸¦ »ðÀÔÇÏ´Â À§Ä¡. 0 Àº ¸Þ´ºÀÇ ¼±µÎ
¿¹¿Ü:
IllegalArgumentException - index ÀÇ °ªÀÌ 0 º¸´Ù ÀÛÀº °æ¿ì
°ü·Ã Ç׸ñ:
Action

insert

public void insert(Component  component,
                   int index)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®¸¦, ¸Þ´ºÀÇ ÁöÁ¤µÈ À§Ä¡¿¡ »ðÀÔÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
component - »ðÀÔÇÏ´Â Component
index - ÄÄÆÛ³ÍÆ®¸¦ »ðÀÔÇÏ´Â À§Ä¡. 0 Àº ¸Þ´ºÀÇ ¼±µÎ
¿¹¿Ü:
IllegalArgumentException - index ÀÇ °ªÀÌ 0 º¸´Ù ÀÛÀº °æ¿ì

addPopupMenuListener

public void addPopupMenuListener(PopupMenuListener  l)
PopupMenu ûÃëÀÚ¸¦ Ãß°¡ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
l - Ãß°¡ÇÏ´Â PopupMenuListener

removePopupMenuListener

public void removePopupMenuListener(PopupMenuListener  l)
PopupMenu ûÃëÀÚ¸¦ »èÁ¦ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
l - »èÁ¦ÇÏ´Â PopupMenuListener

getPopupMenuListeners

public PopupMenuListener [] getPopupMenuListeners()
ÀÌ JMenuItem ¿¡ addPopupMenuListener()·Î Ãß°¡µÈ ¸ðµç PopupMenuListener ÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
Ãß°¡µÈ ¸ðµç PopupMenuListener. Ãß°¡µÈ ûÃëÀÚ°¡ ¾ø´Â °æ¿ì´Â ÇÏ´ÃÀÇ ¹è¿­
µµÀÔµÈ ¹öÁ¯:
1.4

firePopupMenuWillBecomeVisible

protected void firePopupMenuWillBecomeVisible()
PopupMenuListener ¿¡, pop-up menu°¡ °¡½Ã°¡ µÇ´Â °ÍÀ» ÅëÁöÇÕ´Ï´Ù.


firePopupMenuWillBecomeInvisible

protected void firePopupMenuWillBecomeInvisible()
PopupMenuListener ¿¡, pop-up menu°¡ ºÒ°¡½Ã°¡ µÇ´Â °ÍÀ» ÅëÁöÇÕ´Ï´Ù.


firePopupMenuCanceled

protected void firePopupMenuCanceled()
PopupMenuListener ¿¡, pop-up menu°¡ »èÁ¦µÈ °ÍÀ» ÅëÁöÇÕ´Ï´Ù.


pack

public void pack()
ÄÁÅ×À̳ʸ¦ ·¹À̾ƿô ÇØ, ³»¿ëÀÇ Ç¥½Ã¿¡ ÃÖ¼ÒÇÑÀÇ °ø°£À» »ç¿ëÇϵµ·Ï(µíÀÌ) ÇÕ´Ï´Ù.


setVisible

public void setVisible(boolean b)
pop-up menuÀÇ °¡½Ã¼ºÀ» ¼³Á¤ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º JComponent ³»ÀÇ setVisible
ÆÄ¶ó¹ÌÅÍ:
b - pop-up¸¦ °¡½Ã·Î ÇÏ´Â °æ¿ì´Â true, ¼û±â´Â °æ¿ì´Â false

isVisible

public boolean isVisible()
pop-up menu°¡ °¡½Ã (ÇöÀç Ç¥½ÃÁß)ÀÎ °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ isVisible
¹Ýȯ°ª:
ÄÄÆÛ³ÍÆ®°¡ °¡½ÃÀÇ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
Component.setVisible(boolean)

setLocation

public void setLocation(int x,
                        int y)
x, y ÁÂÇ¥¸¦ »ç¿ëÇØ, pop-up menuÀÇ Á»󱸼®ÀÇ À§Ä¡¸¦ ¼³Á¤ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Component ³»ÀÇ setLocation
ÆÄ¶ó¹ÌÅÍ:
x - pop-up menuÀÇ »õ·Î¿î À§Ä¡ÀÇ x ÁÂÇ¥
y - pop-up menuÀÇ »õ·Î¿î À§Ä¡ÀÇ y ÁÂÇ¥
°ü·Ã Ç׸ñ:
Component.getLocation() , Component.setBounds(int, int, int, int)

getInvoker

public Component  getInvoker()
pop-up menuÀÇ È£Ãâ ÄÄÆÛ³ÍÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
pop-up menu°¡ Ç¥½ÃµÇ´Â Component

setInvoker

public void setInvoker(Component  invoker)
pop-up menuÀÇ È£Ãâ ÄÄÆÛ³ÍÆ®, Áï, pop-up menu Ç׸ñÀÌ Ç¥½ÃµÇ´Â ÄÄÆÛ³ÍÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
invoker - pop-up menu°¡ Ç¥½ÃµÇ´Â Component

show

public void show(Component  invoker,
                 int x,
                 int y)
È£Ãâ ÄÄÆÛ³ÍÆ®³»ÀÇ x, y ÁÂÇ¥·Î ÁöÁ¤µÈ À§Ä¡¿¡, pop-up menuÀ» Ç¥½ÃÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
invoker - pop-up menu°¡ Ç¥½ÃµÇ´Â ÄÄÆÛ³ÍÆ®
x - pop-up menu¸¦ Ç¥½ÃÇϴ ȣÃâ ÄÄÆÛ³ÍÆ®ÀÇ x ÁÂÇ¥
y - pop-up menu¸¦ Ç¥½ÃÇϴ ȣÃâ ÄÄÆÛ³ÍÆ®ÀÇ y ÁÂÇ¥

getComponentAtIndex

public Component  getComponentAtIndex(int i)
Ãßõ µÇ°í ÀÖÁö ¾Ê½À´Ï´Ù.  getComponent(int i) ·Î ¿Å°ÜÁ³½À´Ï´Ù.

ÁöÁ¤µÈ À妽ºÀÇ ¿ä¼Ò¸¦ µ¹·ÁÁÝ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
i - ÄÄÆÛ³ÍÆ®ÀÇ À妽º. 0 ÀÌ ¼±µÎ
¹Ýȯ°ª:
ÁöÁ¤µÈ À妽ºÀÇ Component

getComponentIndex

public int getComponentIndex(Component  c)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ À妽º¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
ÄÄÆÛ³ÍÆ®ÀÇ À妽º. 0 ÀÌ ¼±µÎ. ÄÄÆÛ³ÍÆ®°¡ ¾øÀ¸¸é -1

setPopupSize

public void setPopupSize(Dimension  d)
Dimension ¿ÀºêÁ§Æ®¸¦ »ç¿ëÇØ, pop-up À©µµ¿ìÀÇ »çÀÌÁ ¼³Á¤ÇÕ´Ï´Ù. À̰ÍÀº setPreferredSize(d) ¿Í µ¿µîÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
d - ÀÌ ÄÄÆÛ³ÍÆ®ÀÇ »õ·Î¿î »çÀÌÁ ÁöÁ¤ÇÏ´Â Dimension

setPopupSize

public void setPopupSize(int width,
                         int height)
pop-up À©µµ¿ìÀÇ »çÀÌÁ, ÁöÁ¤µÈ Æø ¹× ³ôÀÌ·Î ¼³Á¤ÇÕ´Ï´Ù. À̰ÍÀº setPreferredSize(new Dimension(width, height)) ¿¡ »ó´çÇÕ´Ï´Ù.


setSelected

public void setSelected(Component  sel)
ÇöÀç ¼±ÅõǴ ÄÄÆÛ³ÍÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. °á°úÀûÀ¸·Î, ¼±Åà ¸ðµ¨ÀÌ º¯°æµË´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
sel - ¼±ÅÃÇÏ´Â Component

isBorderPainted

public boolean isBorderPainted()
º¸´õ¸¦ paint ÇÒÁö ¾î¶³Áö¸¦ Á¶»çÇÕ´Ï´Ù.

¹Ýȯ°ª:
º¸´õ¸¦ paint ÇÏ´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
setBorderPainted(boolean)

setBorderPainted

public void setBorderPainted(boolean b)
º¸´õ¸¦ paint ÇÒÁö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
b - true ÀÇ °æ¿ì´Â º¸´õ°¡ paint µÇ´Â
°ü·Ã Ç׸ñ:
isBorderPainted()

paintBorder

protected void paintBorder(Graphics  g)
borderPainted ÇÁ·ÎÆÛƼ°¡ true ÀÎ °æ¿ì¿¡, pop-up menuÀÇ º¸´õ¸¦ paint ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º JComponent ³»ÀÇ paintBorder
ÆÄ¶ó¹ÌÅÍ:
g - Graphics ¿ÀºêÁ§Æ®
°ü·Ã Ç׸ñ:
JComponent.paint(java.awt.Graphics) , JComponent.setBorder(javax.swing.border.Border)

getMargin

public Insets  getMargin()
pop-up menuÀÇ º¸´õ¿Í ³»¿ëÀÇ »çÀÌ¿¡ ÀÖ´Â ¸¶ÁøÀÇ °ªÀ» µ¹·ÁÁÝ´Ï´Ù (Çȼ¿ ´ÜÀ§).

¹Ýȯ°ª:
¸¶ÁøÀÇ °ªÀ» º¸°ü À¯ÁöÇÏ´Â Insets ¿ÀºêÁ§Æ®

paramString

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

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º JComponent ³»ÀÇ paramString
¹Ýȯ°ª:
ÀÌ JPopupMenu ÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇö

getAccessibleContext

public AccessibleContext  getAccessibleContext()
ÀÌ JPopupMenu ¿¡ °ü·ÃÇÑ AccessibleContext ¸¦ µ¹·ÁÁÝ´Ï´Ù. JPopupMenu ÀÇ °æ¿ì, AccessibleContext ´Â AccessibleJPopupMenu ÀÇ Çü½ÄÀ» ÃëÇÕ´Ï´Ù. Çʿ信 µû¶ó¼­ ½Å±ÔÀÇ AccessibleJPopupMenu ÀνºÅϽº°¡ ÀÛ¼ºµË´Ï´Ù.

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

processMouseEvent

public void processMouseEvent(MouseEvent  event,
                              MenuElement [] path,
                              MenuSelectionManager  manager)
ÀÌ ¸Þ¼Òµå´Â MenuElement ÀÎÅÍÆäÀ̽º¿¡ ÀûÇÕÇϱâ À§Çؼ­ ÇÊ¿äÇÕ´Ï´Ù¸¸, ±¸ÇöµÇ°í ÀÖÁö ¾Ê½À´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º MenuElement ³»ÀÇ processMouseEvent
°ü·Ã Ç׸ñ:
MenuElement.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager)

processKeyEvent

public void processKeyEvent(KeyEvent  e,
                            MenuElement [] path,
                            MenuSelectionManager  manager)
ÀÌ ¸Þ¼Òµå´Â MenuElement ÀÎÅÍÆäÀ̽º¿¡ ÀûÇÕÇϱâ À§Çؼ­ ÇÊ¿äÇÕ´Ï´Ù¸¸, ±¸ÇöµÇ°í ÀÖÁö ¾Ê½À´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º MenuElement ³»ÀÇ processKeyEvent
°ü·Ã Ç׸ñ:
MenuElement.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager)

menuSelectionChanged

public void menuSelectionChanged(boolean isIncluded)
ÀÌ ¸Þ´º¸¦ ¾×ƼºêÇÏ°Ô ÇÏ´ÂÁö ¾×ƼºêÇÏÁö ¾Ê°Ô Çϱâ À§Çؼ­ µµ±¸¸ðÀ½ÀÇ ¼±ÅÃÀÌ º¯°æµÇ¾úÀ» ¶§¿¡, ¸Þ¼¼Áö¸¦ º¸³À´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â javax.swing.MenuElement ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÕ´Ï´Ù. MenuElement.menuSelectionChanged ¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ ÁÖ¼¼¿ä.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º MenuElement ³»ÀÇ menuSelectionChanged
ÆÄ¶ó¹ÌÅÍ:
isIncluded - ÀÌ ¸Þ´º°¡ ¾×ƼºêÇÑ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
MenuElement.menuSelectionChanged(boolean)

getSubElements

public MenuElement [] getSubElements()
ÀÌ ¸Þ´º ÄÄÆÛ³ÍÆ®ÀÇ ºÎ¸Þ´º¸¦ ÀúÀåÇÏ´Â MenuElement ÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù. JMenuElement ÀÎÅÍÆäÀ̽º¿¡ ÀûÇÕÇÏ´Â Ç׸ñ¸¸À» µ¹·ÁÁÝ´Ï´Ù. pop-up menu°¡ null ÀÇ °æ¿ì´Â ÇÏ´ÃÀÇ ¹è¿­À» µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â MenuElement ÀÎÅÍÆäÀ̽º¿¡ ÀûÇÕÇϱâ À§Çؼ­ ÇÊ¿äÇÕ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º MenuElement ³»ÀÇ getSubElements
¹Ýȯ°ª:
MenuElement ¿ÀºêÁ§Æ®ÀÇ ¹è¿­
°ü·Ã Ç׸ñ:
MenuElement.getSubElements()

getComponent

public Component  getComponent()
ÀÌ JPopupMenu ÄÄÆÛ³ÍÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù.

Á¤ÀÇ:
ÀÎÅÍÆäÀ̽º MenuElement ³»ÀÇ getComponent
¹Ýȯ°ª:
ÀÌ JPopupMenu ¿ÀºêÁ§Æ®
°ü·Ã Ç׸ñ:
MenuElement.getComponent()

isPopupTrigger

public boolean isPopupTrigger(MouseEvent  e)
JPopupMenu ÀÇ ÇöÀç ÀνºÅç µÇ°í ÀÖ´Â UI °¡ MouseEvent ¸¦ pop-up ¹æ¾Æ¼è¶ó°í º¸´Â °æ¿ì´Â true ¸¦ µ¹·ÁÁÝ´Ï´Ù.

¹Ýȯ°ª:
¸¶¿ì½º À̺¥Æ®°¡ pop-up ¹æ¾Æ¼èÀÇ °æ¿ì´Â true
µµÀÔµÈ ¹öÁ¯:
1.3

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.