|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor¡¡ ¡¡ | ¸Þ¼µå | »ó¼¼: Çʵå | constructor¡¡ ¡¡ | ¸Þ¼µå | |||||||||
public interface ListSelectionModel
°íÁ¤ÀÇ À妽º¸¦ °¡Áö´Â °ªÀÇ ¸®½ºÆ®¸¦ Ç¥½ÃÇÏ´Â ÄÄÆÛ³ÍÆ®ÀÇ, ÇöÀçÀÇ ¼±Åà »óŸ¦ ³ªÅ¸³À´Ï´Ù. ¼±Åà »óÅ´ ±¸°£¼¼Æ®·Î¼ ¸ðµ¨È µÇ¾î °¢ ±¸°£Àº ¼±ÅÃµÈ ¸®½ºÆ® ¿ä¼ÒÀÇ ¿¬¼Ó ¹üÀ§¸¦ ³ªÅ¸³À´Ï´Ù. ¼±ÅÃµÈ ±¸°£¼¼Æ®¸¦ º¯°æÇÏ´Â ¸Þ¼µå´Â ¸ðµÎ, ´ÝÀº ±¸°£À» ³ªÅ¸³»´Â index0¿Í index1¸¦ 1 Á¶¿Í ÇÏ´Â À妽º¸¦ ÃëÇÕ´Ï´Ù. Áï, ±¸°£¿¡´Â index0¿Í index1 ¾çÂÊ ¸ðµÎ°¡ Æ÷ÇԵ˴ϴÙ.
DefaultListSelectionModel | ÇÊµå °³¿ä | |
|---|---|
static int |
MULTIPLE_INTERVAL_SELECTION
selectionMode ÇÁ·ÎÆÛƼÀÇ °ªÀÔ´Ï´Ù. |
static int |
SINGLE_INTERVAL_SELECTION
selectionMode ÇÁ·ÎÆÛƼÀÇ °ªÀÔ´Ï´Ù. |
static int |
SINGLE_SELECTION
selectionMode ÇÁ·ÎÆÛƼÀÇ °ªÀÔ´Ï´Ù. |
| ¸Þ¼µå °³¿ä | |
|---|---|
void |
addListSelectionListener (ListSelectionListener x)
¼±Åà ¹üÀ§ÀÇ º¯°æÀÌ ÅëÁöµÇ´Â ¸®½º³Ê¸¦ ¸®½ºÆ®¿¡ Ãß°¡ÇÕ´Ï´Ù. |
void |
addSelectionInterval (int index0,
int index1)
¼±Åà ¹üÀ§¸¦, ÇöÀçÀÇ ¼±Åà ¹üÀ§¿Í index0 ÀÌ»ó index1 ¾Æ·¡ÀÇ À妽º°¡ °¡¸®Å°´Â ¹üÀ§¿ÍÀÇ ÈÁýÇÕÀ¸·Î º¯°æÇÕ´Ï´Ù. |
void |
clearSelection ()
¼±Åà ¹üÀ§¸¦ ºó¼¼Æ®·Î º¯°æÇÕ´Ï´Ù. |
int |
getAnchorSelectionIndex ()
setSelectionInterval(), addSelectionInterval(), ¶Ç´Â removeSelectionInterval()ÀÇ Á÷ÀüÀÇ È£Ãâ·ÎºÎÅÍ, ÃÖÃÊÀÇ À妽º Àμö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getLeadSelectionIndex ()
setSelectionInterval(), addSelectionInterval(), ¶Ç´Â removeSelectionInterval()ÀÇ Á÷ÀüÀÇ È£Ãâ·ÎºÎÅÍ, 2¹øÂ°ÀÇ À妽º Àμö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getMaxSelectionIndex ()
¸¶Áö¸·¿¡ ¼±ÅÃµÈ À妽º¸¦ µ¹·ÁÁÖ´ÂÁö, ¼±Åà ¹üÀ§°¡ ºñ¾îÀÖ´Â °æ¿ì¿¡ -1¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getMinSelectionIndex ()
ÃÖÃÊ·Î ¼±ÅÃµÈ À妽º¸¦ µ¹·ÁÁÖ´ÂÁö, ¼±Åà ¹üÀ§°¡ ºñ¾îÀÖ´Â °æ¿ì¿¡ -1¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getSelectionMode ()
ÇöÀçÀÇ ¼±Åà ¸ðµå¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
boolean |
getValueIsAdjusting ()
°ªÀÌ ÀÏ·ÃÀÇ º¯°æÀ» ¹Þ°í ÀÖ´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
void |
insertIndexInterval (int index,
int length,
boolean before)
index Àü/ÈĺÎÅÍ ½ÃÀ۵Ǵ length À妽º¸¦ »ðÀÔÇÕ´Ï´Ù. |
boolean |
isSelectedIndex (int index)
ÁöÁ¤ÀÇ À妽º°¡ ¼±Åõǰí ÀÖ´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
boolean |
isSelectionEmpty ()
À妽º°¡ ¼±ÅõǾî ÀÖÁö ¾ÊÀº °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
void |
removeIndexInterval (int index0,
int index1)
¼±Åà ¸ðµ¨·ÎºÎÅÍ, index0¿Í index1¸¦ ¾ç´ÜÀ¸·Î¼ Æ÷ÇÔÇÑ ±¸°£ÀÇ À妽º¸¦ »èÁ¦ÇÕ´Ï´Ù. |
void |
removeListSelectionListener (ListSelectionListener x)
¼±Åà ¹üÀ§ÀÇ º¯°æÀÌ ÅëÁöµÇ´Â ¸®½º³Ê¸¦ ¸®½ºÆ®·ÎºÎÅÍ »èÁ¦ÇÕ´Ï´Ù. |
void |
removeSelectionInterval (int index0,
int index1)
¼±Åà ¹üÀ§¸¦, ÇöÀçÀÇ ¼±Åà ¹üÀ§¿Í index0 ÀÌ»ó index1 ¾Æ·¡ÀÇ À妽º°¡ °¡¸®Å°´Â ¹üÀ§¿ÍÀÇ Â÷ÀÌ ÁýÇÕÀ¸·Î º¯°æÇÕ´Ï´Ù. |
void |
setAnchorSelectionIndex (int index)
¼±Åà ¹üÀ§ÀÇ ¿¨Ä¿ À妽º¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setLeadSelectionIndex (int index)
¼±Åà ¹üÀ§ÀÇ ¸®µå À妽º¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setSelectionInterval (int index0,
int index1)
¼±Åà ¹üÀ§¸¦ index0 ÀÌ»ó index1 ÀÌÇÏ·Î º¯°æÇÕ´Ï´Ù. |
void |
setSelectionMode (int selectionMode)
¼±Åà ¸ðµå¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setValueIsAdjusting (boolean valueIsAdjusting)
ÀÌ ÇÁ·ÎÆÛƼ´Â ¸ðµ¨ÀÇ °ª¿¡ Àû¿ëµÇ°í ÀÖ´Â º¯°æÀÌ ´ÜÀÏÀÇ À̺¥Æ®¶ó°í »ý°¢µÇ´Â °æ¿ì¿¡ true°¡ µË´Ï´Ù. |
| ÇʵåÀÇ »ó¼¼ |
|---|
static final int SINGLE_SELECTION
setSelectionMode(int),
Á¤¼ö Çʵ尪 static final int SINGLE_INTERVAL_SELECTION
setSelectionMode(int),
Á¤¼ö Çʵ尪 static final int MULTIPLE_INTERVAL_SELECTION
setSelectionMode(int),
Á¤¼ö Çʵ尪 | ¸Þ¼µåÀÇ »ó¼¼ |
|---|
void setSelectionInterval(int index0,
int index1)
index0 - ±¸°£ÀÇ ÇÑÆíÀÇ ±¸¼®ÀÇ °ªindex1 - ±¸°£ÀÇ ÇÑÆíÀÇ ±¸¼®ÀÇ °ªaddListSelectionListener(javax.swing.event.ListSelectionListener)
void addSelectionInterval(int index0,
int index1)
index0 - ±¸°£ÀÇ ÇÑÆíÀÇ ±¸¼®ÀÇ °ªindex1 - ±¸°£ÀÇ ÇÑÆíÀÇ ±¸¼®ÀÇ °ªaddListSelectionListener(javax.swing.event.ListSelectionListener)
void removeSelectionInterval(int index0,
int index1)
index0 - ±¸°£ÀÇ ÇÑÆíÀÇ ±¸¼®ÀÇ °ªindex1 - ±¸°£ÀÇ ÇÑÆíÀÇ ±¸¼®ÀÇ °ªaddListSelectionListener(javax.swing.event.ListSelectionListener) int getMinSelectionIndex()
int getMaxSelectionIndex()
boolean isSelectedIndex(int index)
int getAnchorSelectionIndex()
getLeadSelectionIndex(),
setSelectionInterval(int, int),
addSelectionInterval(int, int) void setAnchorSelectionIndex(int index)
getAnchorSelectionIndex() int getLeadSelectionIndex()
getAnchorSelectionIndex(),
setSelectionInterval(int, int),
addSelectionInterval(int, int) void setLeadSelectionIndex(int index)
getLeadSelectionIndex() void clearSelection()
addListSelectionListener(javax.swing.event.ListSelectionListener) boolean isSelectionEmpty()
void insertIndexInterval(int index,
int length,
boolean before)
void removeIndexInterval(int index0,
int index1)
void setValueIsAdjusting(boolean valueIsAdjusting)
valueIsAdjusting - ÇÁ·ÎÆÛƼÀÇ »õ·Î¿î °ªgetValueIsAdjusting() boolean getValueIsAdjusting()
setValueIsAdjusting(boolean) void setSelectionMode(int selectionMode)
SINGLE_SELECTION ¸®½ºÆ® À妽º¸¦ 1ȸ¿¡ 1°³
¸¸ ¼±ÅÃÇÒ ¼ö ÀÖ´Ù. ÀÌ ¸ðµå¿¡¼´Â setSelectionInterval ¸Þ¼µå¿Í addSelectionInterval ¸Þ¼µå´Â µ¿µîÇØ, 2¹øÂ°ÀÇ À妽º Àμö ( ¡¸¸®µå À妽º¡¹)¸¸ÀÌ »ç¿ëµÈ´Ù. SINGLE_INTERVAL_SELECTION ¿¬¼ÓÇÏ´Â À妽º ±¸°£À» 1ȸ¿¡ 1°³
¼±ÅÃÇÒ ¼ö ÀÖ´Ù. ÀÌ ¸ðµå¿¡¼´Â setSelectionInterval ¸Þ¼µå¿Í addSelectionInterval ¸Þ¼µå´Â µ¿µî. MULTIPLE_INTERVAL_SELECTION ÀÌ ¸ðµå¿¡¼´Â ¼±Åà ´ë»óÀ¸·Î Á¦ÇÑÀº ¾ø´Ù.
getSelectionMode() int getSelectionMode()
setSelectionMode(int) void addListSelectionListener(ListSelectionListener x)
x - ListSelectionListenerremoveListSelectionListener(javax.swing.event.ListSelectionListener),
setSelectionInterval(int, int),
addSelectionInterval(int, int),
removeSelectionInterval(int, int),
clearSelection(),
insertIndexInterval(int, int, boolean),
removeIndexInterval(int, int) void removeListSelectionListener(ListSelectionListener x)
x - ListSelectionListeneraddListSelectionListener(javax.swing.event.ListSelectionListener)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor¡¡ ¡¡ | ¸Þ¼µå | »ó¼¼: Çʵå | constructor¡¡ ¡¡ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.