|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ComboBoxUI
javax.swing.plaf.basic.BasicComboBoxUI
public class BasicComboBoxUI
JComboBox¸¦ À§ÇÑ ±âº» UI ±¸ÇöÀÔ´Ï´Ù.
combobox´Â º¹ÇÕ ÄÄÆÛ³ÍÆ®, Áï ¸¹Àº ´Ü¼øÇÑ ÄÄÆÛ³ÍÆ®ÀÇ ÁýÇÕÀÔ´Ï´Ù. ÀÌ Å¬·¡½º´Â combobox¿Í combobox ¸ðµ¨»óÀÇ ¸®½º³Ê¸¦ ÀÛ¼º, °ü¸®ÇÕ´Ï´Ù. ÀÌ·¯ÇÑ ¸®½º³Ê´Â combobox »óÅÂ¿Í ÇÁ·ÎÆÛƼ¿¡ ÀÖ¾î¼ÀÇ º¯°æ¿¡ ÀÀÇØ, »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º¸¦ °»½ÅÇÕ´Ï´Ù.
¸ðµç À̺¥Æ® 󸮴 createxxxListener()
°¢ ¸Þ¼µå ¹× ³»ºÎ Ŭ·¡½º¸¦ »ç¿ëÇØ ÀÛ¼ºµÈ ¸®½º³Ê Ŭ·¡½º¿¡ ÀÇÇØ 󸮵˴ϴÙ. ÀÌ Å¬·¡½ºÀÇ µ¿ÀÛÀ» º¯°æÇÏ·Á¸é,
createxxxListener()
°¢ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÑ ´ÙÀ½, µ¶ÀÚÀûÀÎ À̺¥Æ® ¸®½º³Ê¸¦ Á¦°øÇÏ´ÂÁö, ÀÌ Å¬·¡½º¿¡¼ Á¦°øµÈ À̺¥Æ® ¸®½º³Ê·ÎºÎÅÍ »ó¼ÓÇÕ´Ï´Ù.
ƯÁ¤ÀÇ ¾×¼ÇÀ» Ãß°¡ÇÏ·Á¸é,
installKeyboardActions
¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, KeyStroke ¹ÙÀεù¿¡ ÀÀÇØ ¾×¼ÇÀ» Ãß°¡ÇÕ´Ï´Ù. ¡¸The Swing Connection¡¹ÀÇ ¡¸Keyboard Bindings in Swing¡¹ÀÇ Ç׸ñÀ» ÂüÁ¶ÇϽʽÿÀ.
Áßø(Nested) Ŭ·¡½º °³¿ä | |
---|---|
class |
BasicComboBoxUI.ComboBoxLayoutManager
ÀÌ ·¹À̾ƿô ¸Å´ÏÀú´Â comboboxÀÇ ¡¸Ç¥ÁØ¡¹·¹À̾ƿôÀ» Ãë±ÞÇÕ´Ï´Ù. |
class |
BasicComboBoxUI.FocusHandler
Æ÷Ä¿½º°¡ ¾ø¾îÁ³À» ¶§¿¡ ÀÌ ¸®½º³Ê´Â pop-up¸¦ µ¤¾î °¡¸³´Ï´Ù. |
class |
BasicComboBoxUI.ItemHandler
ÀÌ ¸®½º³Ê´Â comboboxÀÇ ¼±ÅÃÀÇ º¯°æÀ» °¨½ÃÇÕ´Ï´Ù. |
class |
BasicComboBoxUI.KeyHandler
ÀÌ ¸®½º³Ê´Â Ű À̺¥Æ®°¡ ³×ºñ°ÔÀÌ¼Ç Å°°¡ ¾Æ´ÑÁö ¾î¶²Áö¸¦ È®ÀÎÇÕ´Ï´Ù. |
class |
BasicComboBoxUI.ListDataHandler
ÀÌ ¸®½º³Ê´Â ComboBoxModel ³»¿¡¼ÀÇ º¯°æÀ» °¨½ÃÇÕ´Ï´Ù. |
class |
BasicComboBoxUI.PropertyChangeHandler
ÀÌ ¸®½º³Ê´Â combobox³»¿¡¼ º¯°æµÈ ¹Ù¿îµå ÇÁ·ÎÆÛƼ¸¦ °¨½ÃÇÕ´Ï´Ù. |
ÇÊµå °³¿ä | |
---|---|
protected JButton |
arrowButton
|
protected Dimension |
cachedMinimumSize
|
protected JComboBox |
comboBox
|
protected CellRendererPane |
currentValuePane
|
protected Component |
editor
|
protected FocusListener |
focusListener
ÀÌ protected Çʵå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀÔ´Ï´Ù. |
protected boolean |
hasFocus
ÀÌ protected Çʵå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀÔ´Ï´Ù. |
protected boolean |
isMinimumSizeDirty
|
protected ItemListener |
itemListener
ÀÌ protected Çʵå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀÔ´Ï´Ù. |
protected KeyListener |
keyListener
ÀÌ protected Çʵå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀÔ´Ï´Ù. |
protected JList |
listBox
|
protected ListDataListener |
listDataListener
ÀÌ protected Çʵå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀÔ´Ï´Ù. |
protected ComboPopup |
popup
|
protected KeyListener |
popupKeyListener
|
protected MouseListener |
popupMouseListener
|
protected MouseMotionListener |
popupMouseMotionListener
|
protected PropertyChangeListener |
propertyChangeListener
ÀÌ protected Çʵå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀÔ´Ï´Ù. |
»ý¼ºÀÚ °³¿ä | |
---|---|
BasicComboBoxUI ()
|
¸Þ¼µå °³¿ä | |
---|---|
void |
addEditor ()
ÀÌ public ¸Þ¼µå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀ¸·Î private ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. |
void |
configureArrowButton ()
public ¸Þ¼µå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀ¸·Î private ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. |
protected void |
configureEditor ()
protected ¸Þ¼µå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀ¸·Î private ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. |
protected JButton |
createArrowButton ()
comboboxÀÇ pop-up ºÎºÐÀÇ Ç¥½Ã ¶Ç´Â ºñÇ¥½ÃÀÇ Á¦¾î¿¡ »ç¿ëµÇ´Â ¹öưÀ» ÀÛ¼ºÇÕ´Ï´Ù. |
protected ComboBoxEditor |
createEditor ()
ÆíÁý °¡´ÉÇÑ combobox·Î »ç¿ëµÇ´Â µðÆúÆ® ¿¡µðÅ͸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected FocusListener |
createFocusListener ()
combobox¿¡ Ãß°¡µÇ´Â FocusListener ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected ItemListener |
createItemListener ()
combobox¿¡ Ãß°¡µÇ´Â ItemListener ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected KeyListener |
createKeyListener ()
combobox¿¡ Ãß°¡µÇ´Â KeyListener ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected LayoutManager |
createLayoutManager ()
combobox¸¦ ±¸¼ºÇÏ´Â ÄÄÆÛ³ÍÆ®¸¦ °ü¸®Çϱâ À§ÇÑ, ·¹À̾ƿô ¸Å´ÏÀú¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected ListDataListener |
createListDataListener ()
ComboBoxModel ¿¡ Ãß°¡µÇ´Â ¸®½ºÆ® µ¥ÀÌÅÍ ¸®½º³Ê¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected ComboPopup |
createPopup ()
comboboxÀÇ pop-up ºÎºÐÀ» ÀÛ¼ºÇÕ´Ï´Ù. |
protected PropertyChangeListener |
createPropertyChangeListener ()
combobox¿¡ Ãß°¡µÇ´Â PropertyChangeListener ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected ListCellRenderer |
createRenderer ()
ÆíÁý ºÒ°¡´ÉÇÑ combobox·Î »ç¿ëµÇ´Â µðÆúÆ® ·»´õ¸µÀ» ÀÛ¼ºÇÕ´Ï´Ù. |
static ComponentUI |
createUI (JComponent c)
|
Accessible |
getAccessibleChild (JComponent c,
int i)
°´Ã¼³»ÀÇ i ¹øÂ°ÀÇ Accessible ±â´ÉÀ» °¡Áö´Â ÀÚ½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù. |
int |
getAccessibleChildrenCount (JComponent c)
°´Ã¼³»ÀÇ »ç¿ëÀÚ º¸Á¶ ±â´ÉÀ» ±¸ÇöÇÏ´ÂÀÚ½Ä ÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected Dimension |
getDefaultSize ()
ÇöÀçÀÇ ·»´õ¸µ°ú ÆùÆ®¸¦ »ç¿ëÇØ, comboboxÀÇ ºñ¾îÀÖ´Â µð½ºÇ÷¹ÀÌ ¿µ¿ªÀÇ µðÆúÆ® »çÀÌÁ ¸®ÅÏÇÕ´Ï´Ù. |
protected Dimension |
getDisplaySize ()
µð½ºÇ÷¹ÀÌ ¿µ¿ªÀÇ, °è»êµÈ »çÀÌÁ ¸®ÅÏÇÕ´Ï´Ù. |
protected Insets |
getInsets ()
JComboBox ·ÎºÎÅÍ ÀÎ ¼¼Æ®¸¦ ÃëµæÇÕ´Ï´Ù. |
Dimension |
getMaximumSize (JComponent c)
Look & Feel¿¡ ÀûÀýÇÑ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ÃÖ´ë »çÀÌÁ ¸®ÅÏÇÕ´Ï´Ù. |
Dimension |
getMinimumSize (JComponent c)
ÃÖ¼Ò »çÀÌÁî´Â µð½ºÇ÷¹ÀÌ ¿µ¿ª, ÀÎ ¼¼Æ® ¹× ¹öưÀ» ´õÇÑ »çÀÌÁîÀÔ´Ï´Ù. |
Dimension |
getPreferredSize (JComponent c)
Look & Feel¿¡ ÀûÀýÇÑ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ÀûÀýÇÑ »çÀÌÁ ¸®ÅÏÇÕ´Ï´Ù. |
protected void |
installComponents ()
ÁýÇÕ combobox¸¦ ±¸¼ºÇÏ´Â ÄÄÆÛ³ÍÆ®¸¦ ÀÛ¼º, ÃʱâÈÇÕ´Ï´Ù. |
protected void |
installDefaults ()
JComboBox ¿¡ µðÆúÆ®ÀÇ Ä÷¯, ÆùÆ®, ·»´õ¸µ ¹× ¿¡µðÅ͸¦ ÀνºÅç ÇÕ´Ï´Ù. |
protected void |
installKeyboardActions ()
JComboBox¿¡ Űº¸µå ¾×¼ÇÀ» Ãß°¡ÇÕ´Ï´Ù. |
protected void |
installListeners ()
combobox¿Í ±× ¸ðµ¨À» À§ÇÑ ¸®½º³Ê¸¦ ÀÛ¼º, ÀνºÅç ÇÕ´Ï´Ù. |
void |
installUI (JComponent c)
Look & Feel¿¡ ÀûÀýÇÑ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®¸¦ ±¸¼ºÇÕ´Ï´Ù. |
boolean |
isFocusTraversable (JComboBox c)
JComboBox °¡ Æ÷Ä¿½ºÀÇ traversalÀÌ °¡´ÉÇÑÁö ¾î¶²Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
protected boolean |
isNavigationKey (int keyCode)
Á¦°øµÈ keyCode¿¡ ´ëÇØ, ³×ºñ°ÔÀ̼ǿ¡ »ç¿ëÇϴ Ű¿¡ ¸Ê ÇÒÁö ¾î¶³Áö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
boolean |
isPopupVisible (JComboBox c)
pop-up°¡ °¡½ÃÀΰ¡ ¾î¶²°¡¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
void |
paint (Graphics g,
JComponent c)
Look &Feel¿¡ ÀûÀýÇÑ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®¸¦ ÆäÀÎÆ® ÇÕ´Ï´Ù. |
void |
paintCurrentValue (Graphics g,
Rectangle bounds,
boolean hasFocus)
ÇöÀç ¼±Åõǰí ÀÖ´Â Ç׸ñÀ» ·»´õ¸µ ÇÕ´Ï´Ù. |
void |
paintCurrentValueBackground (Graphics g,
Rectangle bounds,
boolean hasFocus)
ÇöÀç ¼±Åõǰí ÀÖ´Â Ç׸ñÀÇ ¹é±×¶ó¿îµå¸¦ ·»´õ¸µ ÇÕ´Ï´Ù. |
protected Rectangle |
rectangleForCurrentValue ()
ÇöÀç ¼±Åõǰí ÀÖ´Â Ç׸ñÀ» ·»´õ¸µ Çϱâ À§Çؼ ¿¹¾àµÇ°í ÀÖ´Â ¿µ¿ªÀ» ¸®ÅÏÇÕ´Ï´Ù. |
void |
removeEditor ()
public ¸Þ¼µå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀ¸·Î private ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. |
protected void |
selectNextPossibleValue ()
¸®½ºÆ®·ÎºÎÅÍ ´ÙÀ½ÀÇ Ç׸ñÀ» ¼±ÅÃÇÕ´Ï´Ù. |
protected void |
selectPreviousPossibleValue ()
¸®½ºÆ®·ÎºÎÅÍ 1°³ ÀüÀÇ Ç׸ñÀ» ¼±ÅÃÇÕ´Ï´Ù. |
void |
setPopupVisible (JComboBox c,
boolean v)
pop-up¸¦ ¼û±é´Ï´Ù. |
protected void |
toggleOpenClose ()
pop-up°¡ Ç¥½ÃµÇ°í ÀÖ´Â °æ¿ì´Â ±×°ÍÀ» ¼û°Ü, ¼û°ÜÁö°í ÀÖ´Â °æ¿ì´Â ±×°ÍÀ» Ç¥½ÃÇÕ´Ï´Ù. |
void |
unconfigureArrowButton ()
public ¸Þ¼µå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀ¸·Î private ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. |
protected void |
unconfigureEditor ()
protected ¸Þ¼µå´Â ±¸Çö °íÀ¯ÀÇ °ÍÀ¸·Î private ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. |
protected void |
uninstallComponents ()
combobox¸¦ ±¸¼ºÇÏ´Â ÁýÇÕ ÄÄÆÛ³ÍÆ®´Â µî·ÏÀÌ ÇØÁ¦µÇ¾î ÃʱâȵÇÁö ¾Ê½À´Ï´Ù. |
protected void |
uninstallDefaults ()
JComboBox ·ÎºÎÅÍ, µðÆúÆ®ÀÇ Ä÷¯, ÆùÆ®, ·»´õ¸µ ¹× ¿¡µðÅ͸¦ ¾ðÀνºÅçÇÕ´Ï´Ù. |
protected void |
uninstallKeyboardActions ()
Æ÷Ä¿½º InputMap ¹× ActionMap¸¦ »èÁ¦ÇÕ´Ï´Ù. |
protected void |
uninstallListeners ()
ÀνºÅç µÈ ¸®½º³Ê¸¦, combobox¿Í ±× ¸ðµ¨·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù. |
void |
uninstallUI (JComponent c)
installUI ½Ã¿¡
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®·Î ½ÇÇàÇÑ ±¸¼ºÀ» Ãë¼ÒÇÕ´Ï´Ù. |
Ŭ·¡½º javax.swing.plaf. ComponentUI ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
contains,
update |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
protected JComboBox comboBox
protected boolean hasFocus
protected JList listBox
protected CellRendererPane currentValuePane
protected ComboPopup popup
protected Component editor
protected JButton arrowButton
protected KeyListener keyListener
createKeyListener()
protected FocusListener focusListener
createFocusListener()
protected PropertyChangeListener propertyChangeListener
createPropertyChangeListener()
protected ItemListener itemListener
createItemListener()
protected MouseListener popupMouseListener
protected MouseMotionListener popupMouseMotionListener
protected KeyListener popupKeyListener
protected ListDataListener listDataListener
createListDataListener()
protected boolean isMinimumSizeDirty
protected Dimension cachedMinimumSize
»ý¼ºÀÚ »ó¼¼ |
---|
public BasicComboBoxUI()
¸Þ¼µåÀÇ »ó¼¼ |
---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI
񃬣: ComponentUI
ÀνºÅϽº°¡ ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ UI À§¾çÀ¸·Î¼ ÀνºÅç µÇ°í ÀÖÀ» ¶§ È£ÃâÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå´Â ÀÌÇϸ¦ Æ÷ÇÔÇÑ Look & Feel¿ëÀÇ ÄÄÆÛ³ÍÆ®¸¦ ¿ÏÀüÇÏ°Ô ±¸¼ºÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. LayoutManager
¸¦ ÀνºÅç ÇÑ´ÙPropertyChangeListener
¸¦ ÄÄÆÛ³ÍÆ®¿¡ ÀÛ¼º ¶Ç´Â ÀνºÅç ÇÑ´Ù
ComponentUI
³»ÀÇ installUI
c
- UI À§¾çÀÌ ÀνºÅç µÇ°í ÀÖ´Â ÄÄÆÛ³ÍÆ®ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
񃬣: installUI
½Ã¿¡
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®·Î ½ÇÇàÇÑ ±¸¼ºÀ» Ãë¼ÒÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå´Â ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ UI À§¾çÀ¸·Î¼ÀÇ UIComponent
ÀνºÅϽº°¡ »èÁ¦µÇ°í ÀÖÀ» ¶§ È£ÃâÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå´Â installUI
¿¡ ÀÇÇØ ½ÇÇàµÈ ±¸¼ºÀ» ¹ÙÅÁÀ¸·Î µÇµ¹¸± Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì
JComponent
ÀνºÅϽº¸¦ ±ú²ýÇÑ »óÅ (¿©ºÐÀÇ ¸®½º³Ê³ª, Look & Feel °íÀ¯ÀÇ ÇÁ·ÎÆÛƼ °´Ã¼°¡ ³²Áö ¾Ê°Ô)·Î Çϵµ·Ï ÃæºÐÈ÷ ÁÖÀÇÇØ ÁÖ¼¼¿ä. ¼ø¼¿¡´Â ´ÙÀ½ÀÇ °ÍÀÌ ÀÖ½À´Ï´Ù.
ComponentUI
³»ÀÇ uninstallUI
c
- ÀÌ UI À§¾çÀÌ »èÁ¦µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI °´Ã¼°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´ÂComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installDefaults()
protected void installListeners()
protected void uninstallDefaults()
protected void uninstallListeners()
installListeners
¿¡ Ãß°¡µÈ °Í °Í°ú °°°Ô µÉ Çʿ䰡 ÀÖ½À´Ï´Ù.
protected ComboPopup createPopup()
ComboPopup
ÀνºÅϽºComboPopup
protected KeyListener createKeyListener()
KeyListener
¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå°¡ nullÀ»
µ¹·ÁÁÖ´Â °æ¿ì, combobox¿¡´Â Ãß°¡µÇÁö ¾Ê½À´Ï´Ù.
KeyListener
ÀνºÅϽº, ¶Ç´Â nullprotected FocusListener createFocusListener()
FocusListener
¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå°¡ nullÀ»
µ¹·ÁÁÖ´Â °æ¿ì, combobox¿¡´Â Ãß°¡µÇÁö ¾Ê½À´Ï´Ù.
FocusListener
ÀνºÅϽº, ¶Ç´Â nullprotected ListDataListener createListDataListener()
ComboBoxModel
¿¡ Ãß°¡µÇ´Â ¸®½ºÆ® µ¥ÀÌÅÍ ¸®½º³Ê¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå°¡ nullÀ»
µ¹·ÁÁÖ´Â °æ¿ì, combobox ¸ðµ¨¿¡°Ô´Â Ãß°¡µÇÁö ¾Ê½À´Ï´Ù.
ListDataListener
ÀνºÅϽº, ¶Ç´Â nullprotected ItemListener createItemListener()
ItemListener
¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå°¡ nullÀ»
µ¹·ÁÁÖ´Â °æ¿ì, combobox¿¡´Â Ãß°¡µÇÁö ¾Ê½À´Ï´Ù.
¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, µ¶ÀÚÀûÀÎ ItemEvent Çڵ鷯ÀÇ ÀνºÅϽº¸¦ µ¹·ÁÁÙ ¼ö°¡ ÀÖ½À´Ï´Ù.
ItemListener
ÀνºÅϽº, ¶Ç´Â nullprotected PropertyChangeListener createPropertyChangeListener()
PropertyChangeListener
¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå°¡ nullÀ»
µ¹·ÁÁÖ´Â °æ¿ì, combobox¿¡´Â Ãß°¡µÇÁö ¾Ê½À´Ï´Ù.
PropertyChangeListener
ÀνºÅϽº, ¶Ç´Â nullprotected LayoutManager createLayoutManager()
protected ListCellRenderer createRenderer()
setRenderer
°¡ ¸í½ÃÀûÀ¸·Î ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì¸¸, µðÆúÆ® ·»´õ¸µÀÌ »ç¿ëµË´Ï´Ù.
ListCellRender
JComboBox.setRenderer(javax.swing.ListCellRenderer)
protected ComboBoxEditor createEditor()
setEditor
°¡ ¸í½ÃÀûÀ¸·Î ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì¸¸, µðÆúÆ® ¿¡µðÅͰ¡ »ç¿ëµË´Ï´Ù.
ComboBoxEditor
JComboBox.setEditor(javax.swing.ComboBoxEditor)
protected void installComponents()
protected void uninstallComponents()
public void addEditor()
ComboBoxEditor
¸¦ ÀÛ¼ºÇØ ÁÖ¼¼¿ä.
createEditor()
,
JComboBox.setEditor(javax.swing.ComboBoxEditor)
,
ComboBoxEditor
public void removeEditor()
addEditor()
protected void configureEditor()
addEditor()
protected void unconfigureEditor()
addEditor()
public void configureArrowButton()
createArrowButton()
public void unconfigureArrowButton()
createArrowButton()
protected JButton createArrowButton()
public boolean isPopupVisible(JComboBox c)
ComboBoxUI
³»ÀÇ isPopupVisible
public void setPopupVisible(JComboBox c, boolean v)
ComboBoxUI
³»ÀÇ setPopupVisible
public boolean isFocusTraversable(JComboBox c)
ComboBoxUI
³»ÀÇ isFocusTraversable
public void paint(Graphics g, JComponent c)
ComponentUI
񃬣: ComponentUI.update
¸Þ¼µå·ÎºÎÅÍ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®°¡ ÆäÀÎÆ® µÉ ¶§ È£ÃâÇÕ´Ï´Ù. ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, ÁöÁ¤µÈ Graphics
°´Ã¼¸¦ »ç¿ëÇØ ÄÄÆÛ³ÍÆ®ÀÇ ³»¿ëÀ» ·»´õ¸µ ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
ComponentUI
³»ÀÇ paint
g
- ÆäÀÎÆ® ´ë»óÀÇ Graphics
ÄÁÅØ½ºÆ®
c
- ÆäÀÎÆ® µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI °´Ã¼°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´ÂComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public Dimension getPreferredSize(JComponent c)
ComponentUI
񃬣: null
ÀÌ ¸®ÅϵÈÀÎ °æ¿ì, ÀûÀýÇÑ »çÀÌÁî´Â ´ë½Å¿¡ ÄÄÆÛ³ÍÆ®ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¿¡ ÀÇÇØ °è»êµË´Ï´Ù (À̰ÍÀº ƯÁ¤ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¸¦ ÀνºÅç µÇ¾î ÀÖ´Â ÄÄÆÛ³ÍÆ®ÀÇ °æ¿ì¿¡ Ãßõ ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù). ÀÌ ¸Þ¼µåÀÇ µðÆúÆ® ±¸ÇöÀº null
À»
¸®ÅÏÇÕ´Ï´Ù.
ComponentUI
³»ÀÇ getPreferredSize
c
- ÀûÀýÇÑ »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI °´Ã¼°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´ÂJComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
ComponentUI
³»ÀÇ getMinimumSize
c
- ÃÖ¼Ò »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI °´Ã¼°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´Ù
Dimension
°´Ã¼, ¶Ç´Â null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
ComponentUI
񃬣: null
ÀÌ ¸®ÅϵÈÀÎ °æ¿ì, ÃÖ´ë »çÀÌÁî´Â ´ë½Å¿¡ ÄÄÆÛ³ÍÆ®ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¿¡ ÀÇÇØ °è»êµË´Ï´Ù (À̰ÍÀº ƯÁ¤ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¸¦ ÀνºÅç µÇ¾î ÀÖ´Â ÄÄÆÛ³ÍÆ®ÀÇ °æ¿ì¿¡ Ãßõ ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù). ÀÌ ¸Þ¼µåÀÇ µðÆúÆ® ±¸ÇöÀº getPreferredSize
¸¦ È£ÃâÇØ, ±× °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.
ComponentUI
³»ÀÇ getMaximumSize
c
- ÃÖ´ë »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI °´Ã¼°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´Ù
Dimension
°´Ã¼, ¶Ç´Â null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
public int getAccessibleChildrenCount(JComponent c)
ComponentUI
񃬣: Accessible
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϰí ÀÖ´Â °æ¿ì, ÀÌ ¸Þ¼µå´Â ÀÌ °´Ã¼ÀÇÀÚ½Ä
ÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. UI °¡ ȸé»ó¿¡ ÄÄÆÛ³ÍÆ®·Î¼ Ç¥½ÃµÇ´Â ¿µ¿ªÀº Á¦°øÇÏÁö¸¸, ÀÌ ¿µ¿ªÀ» Á¦°øÇϴµ¥ ½ÇÁ¦ÀÇ ÄÄÆÛ³ÍÆ®¸¦ »ç¿ëÇÏÁö ¾Ê´Â °æ¿ì, UI¿¡ ´ëÇØ Çʿ信 µû¶ó¼ ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÒ ¼ö ÀÖ½À´Ï´Ù.
ÁÖ: ¹öÀü
1.3 ±× µÚ·Î´Â ÀÌ ¸Þ¼µå ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleChildrenCount()
¸¦ È£ÃâÇÏ´Â °ÍÀÌ Ãßõ µÇ°í ÀÖ½À´Ï´Ù.
ComponentUI
³»ÀÇ getAccessibleChildrenCount
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)
public Accessible getAccessibleChild(JComponent c, int i)
ComponentUI
񃬣: i
¹øÂ°ÀÇ Accessible
±â´ÉÀ» °¡Áö´Â ÀÚ½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù. UI °¡ ȸé»ó¿¡ ÄÄÆÛ³ÍÆ®·Î¼ Ç¥½ÃµÇ´Â ¿µ¿ªÀº Á¦°øÇÏÁö¸¸, ÀÌ ¿µ¿ªÀ» Á¦°øÇϴµ¥ ½ÇÁ¦ÀÇ ÄÄÆÛ³ÍÆ®¸¦ »ç¿ëÇÏÁö ¾Ê´Â °æ¿ì, UI´Â Çʿ信 µû¶ó¼ ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÕ´Ï´Ù.
ÁÖ: ¹öÀü
1.3 ±× µÚ·Î´Â ÀÌ ¸Þ¼µå ´ë½Å¿¡ Component.AccessibleAWTComponent.getAccessibleChild()
¸¦ È£ÃâÇÏ´Â °ÍÀÌ Ãßõ µÇ°í ÀÖ½À´Ï´Ù.
ComponentUI
³»ÀÇ getAccessibleChild
i
- Á¦·Î·ÎºÎÅÍ ½ÃÀ۵ǴÂÀÚ½Ä
ÀÇ À妽º
i
¹øÂ°ÀÇ Accessible
±â´ÉÀ» °¡Áö´ÂÀÚ½Ä
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
protected boolean isNavigationKey(int keyCode)
protected void selectNextPossibleValue()
protected void selectPreviousPossibleValue()
protected void toggleOpenClose()
protected Rectangle rectangleForCurrentValue()
protected Insets getInsets()
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
protected Dimension getDefaultSize()
getDisplaySize()
protected Dimension getDisplaySize()
Ç׸ñ¼ö°¡ ¸¹Àº combobox¿¡ ´ëÇØ¼´Â prototype µð½ºÇ÷¹ÀÌÄ¡¸¦ »ç¿ëÇØ, µð½ºÇ÷¹ÀÌ »çÀÌÁîÀÇ °è»êÀ» Å«ÆøÀ¸·Î »¡¸® ÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù.
JComboBox.setPrototypeDisplayValue(java.lang.Object)
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.