|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--javax.swing.plaf.ListUI | +--javax.swing.plaf.basic.BasicListUI
ListUI ÀÇ Windows Look & Feel ¿¡ ÀÇÇÑ ±¸ÇöÀÔ´Ï´Ù.
ÁßøµÈ Ŭ·¡½ºÀÇ °³¿ä | |
class |
BasicListUI.FocusHandler
ÀÌ ³»ºÎ Ŭ·¡½º´Â public ¿Í ¸¶Å© µË´Ï´Ù¸¸, À̰ÍÀº ÄÄÆÄÀÏ·¯ÀÇ ¹ö±×°¡ ¿øÀÎÀÔ´Ï´Ù. |
class |
BasicListUI.ListDataHandler
installUI ÀÇ ½ÇÇà½Ã, ¹× JList.model ÇÁ·ÎÆÛƼ°¡ º¯°æµÇ¾úÀ» ¶§¿¡ JList ¸ðµ¨¿¡ Ãß°¡µÇ´Â ListDataListener ÀÔ´Ï´Ù. |
class |
BasicListUI.ListSelectionHandler
installUI ÀÇ ½ÇÇà½Ã, ¹× JList.selectionModel ÇÁ·ÎÆÛƼ°¡ º¯°æµÇ¾úÀ» ¶§¿¡, JLists ¼±Åà ¸ðµ¨¿¡ Ãß°¡µÇ´Â ListSelectionListener ÀÔ´Ï´Ù. |
class |
BasicListUI.MouseInputHandler
JList ¸¦ À§ÇÑ Æ÷Ä¿½º ó¸®¿Í ¸¶¿ì½º ÀÔ·ÂÀÔ´Ï´Ù. |
class |
BasicListUI.PropertyChangeHandler
PropertyChangeListener ´Â installUI ÀÇ ½ÇÇà½Ã¿¡ JList ¿¡ Ãß°¡µË´Ï´Ù. |
ÇʵåÀÇ °³¿ä | |
protected int |
cellHeight
|
protected int[] |
cellHeights
|
protected static int |
cellRendererChanged
|
protected int |
cellWidth
|
protected static int |
fixedCellHeightChanged
|
protected static int |
fixedCellWidthChanged
|
protected FocusListener |
focusListener
|
protected static int |
fontChanged
|
protected JList |
list
|
protected ListDataListener |
listDataListener
|
protected ListSelectionListener |
listSelectionListener
|
protected static int |
modelChanged
|
protected MouseInputListener |
mouseInputListener
|
protected PropertyChangeListener |
propertyChangeListener
|
protected static int |
prototypeCellValueChanged
|
protected CellRendererPane |
rendererPane
|
protected static int |
selectionModelChanged
|
protected int |
updateLayoutStateNeeded
|
»ý¼ºÀÚÀÇ °³¿ä | |
BasicListUI ()
|
¸Þ¼ÒµåÀÇ °³¿ä | |
protected int |
convertRowToY (int row)
ÁöÁ¤µÈ ÇàÀÇ ¿øÁ¡ÀÇ JList »ó´ë Y ÁÂÇ¥¸¦ µ¹·ÁÁÝ´Ï´Ù. |
protected int |
convertYToRow (int y0)
JList ÀÇ »ó´ë ÁÂÇ¥¸¦, ÇöÀçÀÇ ·¹À̾ƿôÀ» ±âº»À¸·Î ÇØ, ÁÂÇ¥¸¦ Æ÷ÇÔÇÑ ÇàÀ¸·Î º¯È¯ÇÕ´Ï´Ù. |
protected FocusListener |
createFocusListener ()
|
protected ListDataListener |
createListDataListener ()
¸ðµ¨¿¡ ÀÇÇØ Çʿ信 µû¶ó¼ JList ¿¡ Ãß°¡µÇ´Â ListDataListener ÀÇ ÀνºÅϽº¸¦ »ý¼ºÇÕ´Ï´Ù. |
protected ListSelectionListener |
createListSelectionListener ()
selectionModel ¿¡ ÀÇÇØ Çʿ信 µû¶ó¼ JList ¿¡ Ãß°¡µÇ´Â ListSelectionHandler ÀÇ ÀνºÅϽº¸¦ »ý¼ºÇÕ´Ï´Ù. |
protected MouseInputListener |
createMouseInputListener ()
MouseInputListener ¸¦ ±¸ÇöÇÏ´Â delegateÀ» ÀÛ¼ºÇÕ´Ï´Ù. |
protected PropertyChangeListener |
createPropertyChangeListener ()
installUI()¿¡ ÀÇÇØ JList ¿¡ Ãß°¡µÇ´Â PropertyChangeHandler ÀÇ ÀνºÅϽº¸¦ »ý¼ºÇÕ´Ï´Ù. |
static ComponentUI |
createUI (JComponent list)
BasicListUI ÀÇ »õ·Î¿î ÀνºÅϽº¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Rectangle |
getCellBounds (JList list,
int index1,
int index2)
ÁöÁ¤µÈ Ç׸ñÀÇ JList ÁÂÇ¥¿¡ ÀÖ¾î¼ÀÇ °æ°è¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Dimension |
getMaximumSize (JComponent c)
Look & Feel ¿¡ ÀûÀýÇÑ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ÃÖ´ë »çÀÌÁ µ¹·ÁÁÝ´Ï´Ù. |
Dimension |
getMinimumSize (JComponent c)
Look & Feel ¿¡ ÀûÀýÇÑ, ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ÃÖ¼Ò »çÀÌÁ µ¹·ÁÁÝ´Ï´Ù. |
Dimension |
getPreferredSize (JComponent c)
¸®½ºÆ®ÀÇ preferredSize ´Â ¹èÄ¡ ¹æÇâ¿¡ ÀÇÇØ Á¤ÇØÁý´Ï´Ù. |
protected int |
getRowHeight (int row)
ÇöÀçÀÇ ·¹À̾ƿôÀ¸·Î, ÁöÁ¤µÈ ÇàÀÇ ³ôÀ̸¦ µ¹·ÁÁÝ´Ï´Ù. |
Point |
indexToLocation (JList list,
int index)
ÁöÁ¤µÈ Ç׸ñÀÇ JList ÁÂÇ¥¿¡ ÀÖ¾î¼ÀÇ ¿øÁ¡À» µ¹·ÁÁÝ´Ï´Ù. |
protected void |
installDefaults ()
JList ÀÇ ÇÁ·ÎÆÛƼ (ÆùÆ®, foreground, ¹× ¹é±×¶ó¿îµåµî)¸¦ ÃʱâÈÇØ, CellRendererPane ¸¦ Ãß°¡ÇÕ´Ï´Ù. |
protected void |
installKeyboardActions ()
BasicListUI ¸¦ °ü·ÃÁöÀ» ¼ö ÀÖ´Â JList »óÀÇ Å°º¸µå ¹ÙÀεùÀ» µ¹·ÁÁÝ´Ï´Ù. |
protected void |
installListeners ()
JList, ±× ¸ðµ¨, ¹× selectionModel ÀÇ Ã»ÃëÀÚ¸¦ ÀÛ¼º ¹× ÀνºÅç ÇÕ´Ï´Ù. |
void |
installUI (JComponent c)
installDefaults() ,installListeners() , ¹× installKeyboardActions() ¸¦ ¼ø¼¿¡ È£ÃâÇØ,this.list ¸¦ ÃʱâÈÇÕ´Ï´Ù. |
int |
locationToIndex (JList list,
Point location)
JList ÁÂÇ¥ÀÇ Á¡À», ±× À§Ä¡¿¡¼ °¡Àå °¡±î¿î ¼¿ÀÇ À妽º·Î º¯È¯ÇÕ´Ï´Ù. |
protected void |
maybeUpdateLayoutState ()
updateLayoutStateNeeded °¡ Á¦·Î°¡ ¾Æ´Ï¸é, updateLayoutState()À» È£ÃâÇØ updateLayoutStateNeeded ¸¦ ¸®¼ÂÆ® ÇÕ´Ï´Ù. |
void |
paint (Graphics g,
JComponent c)
Graphics ¿ÀºêÁ§Æ®ÀÇ clipRect ¿Í ±³Â÷ÇÏ´Â ÇàÀ» paint ÇÕ´Ï´Ù. |
protected void |
paintCell (Graphics g,
int row,
Rectangle rowBounds,
ListCellRenderer cellRenderer,
ListModel dataModel,
ListSelectionModel selModel,
int leadIndex)
List ÀÇ ¼¿À» 1 °³ paint ÇÕ´Ï´Ù. |
protected void |
selectNextIndex ()
1 °³ÀüÀÇ ÇàÀ» ¼±ÅÃÇØ, ±×°ÍÀ» °Á¦ÀûÀ¸·Î °¡½Ã·Î ÇÕ´Ï´Ù. |
protected void |
selectPreviousIndex ()
1 °³ÀüÀÇ ÇàÀ» ¼±ÅÃÇØ, ±×°ÍÀ» °Á¦ÀûÀ¸·Î °¡½Ã·Î ÇÕ´Ï´Ù. |
protected void |
uninstallDefaults ()
null ¿¡ ¸í½ÃÀûÀ¸·Î ¿À¹ö¶óÀ̵å(override)µÇ¾î ÀÖÁö ¾ÊÀº JList ÀÇ ÇÁ·ÎÆÛƼ¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
uninstallKeyboardActions ()
installKeyboardActions ·ÎºÎÅÍ ÀνºÅç µÈ Å°º¸µå ¾×¼ÇÀÇ µî·ÏÀ» ÇØÁ¦ÇÕ´Ï´Ù. |
protected void |
uninstallListeners ()
JList, ±× ¸ðµ¨, ¹× selectionModel ÀÇ Ã»ÃëÀÚ¸¦ »èÁ¦ÇÕ´Ï´Ù. |
void |
uninstallUI (JComponent c)
uninstallListeners() ,uninstallKeyboardActions() , ¹× uninstallDefaults() ¸¦ ¼ø¼¿¡ È£ÃâÇØ,this.list ÀÇ Ãʱâȸ¦ ÇØÁ¦ÇÕ´Ï´Ù. |
protected void |
updateLayoutState ()
cellHeight (¶Ç´Â cellHeights) ¹× cellWidth ÀÇ °ªÀ», ÇöÀçÀÇ ÆùÆ®¿Í fixedCellWidth, fixedCellHeight, ¹× prototypeCellValue ÀÇ ÇöÀçÀÇ °ªÀ» ±âº»À¸·Î ÇØ ´Ù½Ã °è»êÇÕ´Ï´Ù. |
Ŭ·¡½º javax.swing.plaf. ComponentUI ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
contains , getAccessibleChild , getAccessibleChildrenCount , update |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
ÇʵåÀÇ »ó¼¼ |
protected JList list
protected CellRendererPane rendererPane
protected FocusListener focusListener
protected MouseInputListener mouseInputListener
protected ListSelectionListener listSelectionListener
protected ListDataListener listDataListener
protected PropertyChangeListener propertyChangeListener
protected int[] cellHeights
protected int cellHeight
protected int cellWidth
protected int updateLayoutStateNeeded
protected static final int modelChanged
protected static final int selectionModelChanged
protected static final int fontChanged
protected static final int fixedCellWidthChanged
protected static final int fixedCellHeightChanged
protected static final int prototypeCellValueChanged
protected static final int cellRendererChanged
»ý¼ºÀÚÀÇ »ó¼¼ |
public BasicListUI()
¸Þ¼ÒµåÀÇ »ó¼¼ |
protected void paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
paint(java.awt.Graphics, javax.swing.JComponent)
public void paint(Graphics g, JComponent c)
ComponentUI
³»ÀÇ paint
g
- paintó°¡ µÇ´Â Graphics
¹®¸Æc
- paint µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI ¿ÀºêÁ§Æ®°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´ÂpaintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int)
public Dimension getPreferredSize(JComponent c)
¹èÄ¡ ¹æÇâ | ÀûÀýÇÑ »çÀÌÁî |
JList.VERTICAL | ¸®½ºÆ®ÀÇ preferredSize ´Â ÇàÀÇ ³ôÀÌÀÇ ÇÕ°è¿Í ¼¿ÀÇ ÃÖ´ëÆøÀÔ´Ï´Ù. JList.fixedCellHeight °¡ ÁöÁ¤µÇ°í ÀÖ´Â °æ¿ì, ÇàÀÇ ³ôÀÌÀÇ ÇÕ°è´Â (cellVerticalMargins + fixedCellHeight) * model.getSize()°¡ µË´Ï´Ù. ¿©±â¼ rowVerticalMargins ´Â Æ÷Ä¿½º¸¦ ³ªÅ¸³»´Â ³ë¶õ ¾Æ¿ìÆ®¶óÀÎÀ» Ç¥Çö Çϱâ À§Çؼ ÇÒ´çÇÏ´Â area¿¡ »ó´çÇÕ´Ï´Ù. °°ÀÌ fixedCellWidth °¡ ÁöÁ¤µÇ°í ÀÖ´Â °æ¿ì´Â ¼¿ÀÇ °íÁ¤ÆøÀ» »ç¿ëÇÕ´Ï´Ù. |
JList.VERTICAL_WRAP | °¡½ÃÀÇ Çà¼ö°¡ 0 º¸´Ù Å« °æ¿ì, preferredHeight ´Â ¼¿ÀÇ ÃÖ´ëÀÇ ³ôÀÌ * visibleRowCount °¡ µË´Ï´Ù. °¡½ÃÀÇ Çà¼ö°¡ 0 ÀÌÇÏÀÇ °æ¿ì, ÀûÀýÇÑ ³ôÀÌ´Â ÇöÀçÀÇ ¸®½ºÆ®ÀÇ ³ôÀÌ¿Í ¼¿ÀÇ ÃÖ´ëÀÇ ³ôÀÌÁß ºñ½Ñ (ºÐ)ÆíÀÌ µË´Ï´Ù. ÀûÀýÇÑ ÆøÀº ¼¿ÀÇ ÃÖ´ëÆø * ÇÊ¿äÇÑ ·Ä¼ö, °¡ µË´Ï´Ù. ¿©±â¼, ÇÊ¿äÇÑ ·Ä¼ö´Â ¸®½ºÆ®ÀÇ ³ôÀÌ / ¼¿ÀÇ ÃÖ´ëÀÇ ³ôÀÌÀÔ´Ï´Ù. ¼¿ÀÇ ÃÖ´ëÀÇ ³ôÀÌ´Â ¼¿ÀÇ °íÁ¤ÀÇ ³ôÀ̰¡ µÇ´ÂÁö ¸ðµç ¼¿¿¡ ´ëÇØ¼ ¹Ýº¹ÇØ ListCellRenderer ·ÎºÎÅÍ ÃÖ´ëÀÇ ³ôÀ̸¦ °Ë»öÇÏ´Â °ÍÀ¸·Î½á Á¤ÇØÁý´Ï´Ù. |
JList.HORIZONTAL_WRAP | °¡½ÃÀÇ Çà¼ö°¡ 0 º¸´Ù Å« °æ¿ì, preferredHeight ´Â ¼¿ÀÇ ÃÖ´ëÀÇ ³ôÀÌ * adjustedRowCount °¡ µË´Ï´Ù. ¿©±â¼, visibleRowCount ´Â ·Ä¼öÀÇ ÁöÁ¤¿¡ »ç¿ëµË´Ï´Ù. ¼öÆò¿¡ ¹èÄ¡Çϱâ À§ÇØ(¶§¹®¿¡), Çà¼ö´Â ·Ä¼ö·ÎºÎÅÍ Á¤ÇØÁý´Ï´Ù. ¿¹¸¦ µé¾î, 10 Ç׸ñÀÇ ¸ðµ¨·Î °¡½ÃÇà¼ö°¡ 8 À̶ó°í ÇÕ´Ï´Ù. Ç¥½Ã¿¡ ÇÊ¿äÇÑ ¿Àº 2 ¿ÀÔ´Ï´Ù¸¸, 8 ÇàÀ̳ª ÇÊ¿ä¾ø°í, 5 ÇàÀ¸·Î ³¡³³´Ï´Ù. µû¶ó¼, adjustedRowCount ´Â 5 °¡ µË´Ï´Ù.
°¡½ÃÇà¼ö°¡ 0 ÀÌÇÏÀÇ °æ¿ì, ÀûÀýÇÑ ³ôÀÌ´Â ·Ä¼ö¿¡ µû¸¨´Ï´Ù. Àû¾îµµ 1 ¿·Î, |
Insets
´Â list.getInsets()
·ÎºÎÅÍ Á¤ÇØÁý´Ï´Ù.
ComponentUI
³»ÀÇ getPreferredSize
c
- JList ÄÄÆÛ³ÍÆ®
JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
ComponentUI
ÀÇ ±â¼ú: null
°¡ µ¹·ÁÁÖ¾îÁö´Â °æ¿ì, ÃÖ¼Ò »çÀÌÁî´Â ´ë½Å¿¡ ÄÄÆÛ³ÍÆ®ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¿¡ ÀÇÇØ °è»êµË´Ï´Ù (À̰ÍÀº ƯÁ¤ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¸¦ ÀνºÅç µÇ¾î ÀÖ´Â ÄÄÆÛ³ÍÆ®ÀÇ °æ¿ì¿¡ Ãßõ ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù). ÀÌ ¸Þ¼ÒµåÀÇ µðÆúÆ® ±¸ÇöÀº getPreferredSize
¸¦ È£ÃâÇØ, ±× °ªÀ» µ¹·ÁÁÝ´Ï´Ù.
ComponentUI
³»ÀÇ getMinimumSize
c
- ÃÖ¼Ò »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI ¿ÀºêÁ§Æ®°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´Ù
getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
ComponentUI
ÀÇ ±â¼ú: null
°¡ µ¹·ÁÁÖ¾îÁö´Â °æ¿ì, ÃÖ´ë »çÀÌÁî´Â ´ë½Å¿¡ ÄÄÆÛ³ÍÆ®ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¿¡ ÀÇÇØ °è»êµË´Ï´Ù (À̰ÍÀº ƯÁ¤ÀÇ ·¹À̾ƿô ¸Å´ÏÀú¸¦ ÀνºÅç µÇ¾î ÀÖ´Â ÄÄÆÛ³ÍÆ®ÀÇ °æ¿ì¿¡ Ãßõ ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù). ÀÌ ¸Þ¼ÒµåÀÇ µðÆúÆ® ±¸ÇöÀº getPreferredSize
¸¦ È£ÃâÇØ, ±× °ªÀ» µ¹·ÁÁÝ´Ï´Ù.
ComponentUI
³»ÀÇ getMaximumSize
c
- ÃÖ´ë »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI ¿ÀºêÁ§Æ®°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´Ù
getPreferredSize(javax.swing.JComponent)
protected void selectPreviousIndex()
JList.ensureIndexIsVisible(int)
protected void selectNextIndex()
JList.ensureIndexIsVisible(int)
protected void installKeyboardActions()
BasicListUI
¸¦ °ü·ÃÁöÀ» ¼ö ÀÖ´Â JList
»óÀÇ Å°º¸µå ¹ÙÀεùÀ» µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â installUI() ½ÇÇà½Ã¿¡ ºÒ·Á °©´Ï´Ù.
installUI(javax.swing.JComponent)
protected void uninstallKeyboardActions()
installKeyboardActions
·ÎºÎÅÍ ÀνºÅç µÈ Å°º¸µå ¾×¼ÇÀÇ µî·ÏÀ» ÇØÁ¦ÇÕ´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â uninstallUI()ÀÇ ½ÇÇà½Ã¿¡ ºÒ·Á °©´Ï´Ù. ¼ºê Ŭ·¡½º´Â installUI ÀÇ ½ÇÇà½Ã¿¡ µî·ÏµÈ Űº¸µå ¾×¼ÇÀ» ¸ðµÎ, ¿©±â¼ »èÁ¦ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
installUI(javax.swing.JComponent)
protected void installListeners()
installUI(javax.swing.JComponent)
,
uninstallListeners()
protected void uninstallListeners()
uninstallUI(javax.swing.JComponent)
,
installListeners()
protected void installDefaults()
uninstallDefaults()
,
installUI(javax.swing.JComponent)
,
CellRendererPane
protected void uninstallDefaults()
installDefaults()
,
uninstallUI(javax.swing.JComponent)
,
CellRendererPane
public void installUI(JComponent c)
installDefaults()
,installListeners()
, ¹× installKeyboardActions()
¸¦ ¼ø¼¿¡ È£ÃâÇØ,this.list
¸¦ ÃʱâÈÇÕ´Ï´Ù.
ComponentUI
³»ÀÇ installUI
c
- UI delegateÀÌ ÀνºÅç µÇ°í ÀÖ´Â ÄÄÆÛ³ÍÆ®installDefaults()
,
installListeners()
,
installKeyboardActions()
public void uninstallUI(JComponent c)
uninstallListeners()
,uninstallKeyboardActions()
, ¹× uninstallDefaults()
¸¦ ¼ø¼¿¡ È£ÃâÇØ,this.list
ÀÇ Ãʱâȸ¦ ÇØÁ¦ÇÕ´Ï´Ù. this.list ´Â null ·Î ¼³Á¤µË´Ï´Ù.
ComponentUI
³»ÀÇ uninstallUI
c
- ÀÌ UI delegateÀÌ »èÁ¦µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI ¿ÀºêÁ§Æ®°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´ÂuninstallListeners()
,
uninstallKeyboardActions()
,
uninstallDefaults()
public static ComponentUI createUI(JComponent list)
public int locationToIndex(JList list, Point location)
JList
ÁÂÇ¥ÀÇ Á¡À», ±× À§Ä¡¿¡¼ °¡Àå °¡±î¿î ¼¿ÀÇ À妽º·Î º¯È¯ÇÕ´Ï´Ù. ¼¿ÀÌ ÁöÁ¤ÇÑ À§Ä¡¸¦ ½ÇÁ¦·Î Æ÷ÇÔÇÒÁö ¾î¶³Áö¸¦ ÆÇÁ¤Çϱâ À§Çؼ, ÀÌ ¸Þ¼Òµå¿Í getCellBounds
¸¦ Á¶ÇÕÇØ »ç¿ëÇÕ´Ï´Ù. ¸ðµ¨ÀÌ ºñ¾úÀ» °æ¿ì,-1 ¸¦ µ¹·ÁÁÝ´Ï´Ù.
ListUI
³»ÀÇ locationToIndex
location
- ¼¿ÀÇ JList »óÀÇ »ó´ë ÁÂÇ¥
ListUI.locationToIndex(javax.swing.JList, java.awt.Point)
public Point indexToLocation(JList list, int index)
ListUI
ÀÇ ±â¼ú:
ListUI
³»ÀÇ indexToLocation
index
- JList ¼¿ÀÇ À妽º
ListUI.indexToLocation(javax.swing.JList, int)
public Rectangle getCellBounds(JList list, int index1, int index2)
ListUI
ÀÇ ±â¼ú:
ListUI
³»ÀÇ getCellBounds
ListUI.getCellBounds(javax.swing.JList, int, int)
protected int getRowHeight(int row)
convertYToRow(int)
,
convertRowToY(int)
,
updateLayoutState()
protected int convertYToRow(int y0)
getRowHeight(int)
,
updateLayoutState()
protected int convertRowToY(int row)
getRowHeight(int)
,
updateLayoutState()
protected void maybeUpdateLayoutState()
updateLayoutState()
protected void updateLayoutState()
maybeUpdateLayoutState()
protected MouseInputListener createMouseInputListener()
class MyListUI extends BasicListUI { protected MouseInputListener createMouseInputListener() { return new MyMouseInputHandler(); } public class MyMouseInputHandler extends MouseInputHandler { public void mouseMoved(MouseEvent e) { // do some extra work when the mouse moves super.mouseMoved(e); } } }
BasicListUI.MouseInputHandler
,
installUI(javax.swing.JComponent)
protected FocusListener createFocusListener()
protected ListSelectionListener createListSelectionListener()
class MyListUI extends BasicListUI { protected ListSelectionListener createListSelectionListener() { return new MySelectionListener(); } public class MySelectionListener extends ListSelectionHandler { public void valueChanged(ListSelectionEvent e) { // do some extra work when the selection changes super.valueChange(e); } } }
BasicListUI.ListSelectionHandler
,
installUI(javax.swing.JComponent)
protected ListDataListener createListDataListener()
class MyListUI extends BasicListUI { protected ListDataListener createListDataListener() { return new MyListDataListener(); } public class MyListDataListener extends ListDataHandler { public void contentsChanged(ListDataEvent e) { // do some extra work when the models contents change super.contentsChange(e); } } }
ListDataListener
,
JList.getModel()
,
installUI(javax.swing.JComponent)
protected PropertyChangeListener createPropertyChangeListener()
class MyListUI extends BasicListUI { protected PropertyChangeListener createPropertyChangeListener() { return new MyPropertyChangeListener(); } public class MyPropertyChangeListener extends PropertyChangeHandler { public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName(). equals("model")) { // do some extra work when the model changes } super.propertyChange(e); } } }
PropertyChangeListener
,
installUI(javax.swing.JComponent)
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
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.