|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
public interface TableColumnModel
JTable
·Î
»ç¿ëÇϴµ¥ Àû°ÝÀÎ Å×ÀÌºí¿¸ðµ¨ °´Ã¼ÀÇ ¿ä±¸¸¦ Á¤ÀÇÇÕ´Ï´Ù.
DefaultTableColumnModel
¸Þ¼µå °³¿ä | |
---|---|
void |
addColumn (TableColumn aColumn)
tableColumns ¹è¿ÀÇ ¸¶Áö¸·¿¡ aColumn À»
Ãß°¡ÇÕ´Ï´Ù. |
void |
addColumnModelListener (TableColumnModelListener x)
Å×ÀÌºí¿¸ðµ¨ À̺¥Æ®¿ëÀÇ ¸®½º³Ê¸¦ Ãß°¡ÇÕ´Ï´Ù. |
TableColumn |
getColumn (int columnIndex)
columnIndex ¿¡ ÀÖ´Â ¿ÀÇ TableColumn °´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getColumnCount ()
¸ðµ¨ÀÇ ·Ä¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getColumnIndex (Object columnIdentifier)
equals ¸¦ »ç¿ëÇØ ºñ±³ÇßÀ» ¶§¿¡ ½Äº°ÀÚ°¡ identifier ¿Í
µ¿ÀÏÇÑ Å×À̺íÀÇ ÃÖÃÊÀÇ ¿ÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getColumnIndexAtX (int xPosition)
xPosition ¿¡ ÀÖ´Â ¿ÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getColumnMargin ()
°¢ ¿ÀÇ »çÀÌÀÇ ³ÐÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù. |
Enumeration <TableColumn > |
getColumns ()
¸ðµ¨ÀÇ ¸ðµç ¿ÀÇ Enumeration À»
¸®ÅÏÇÕ´Ï´Ù. |
boolean |
getColumnSelectionAllowed ()
¿À» ¼±ÅÃÇÒ ¼ö ÀÖ´Â °æ¿ì´Â true¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getSelectedColumnCount ()
¼±Åõǰí ÀÖ´Â ¿ÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int[] |
getSelectedColumns ()
¼±Åõǰí ÀÖ´Â ¿ ¸ðµç À妽ºÀÇ ¹è¿À» ¸®ÅÏÇÕ´Ï´Ù. |
ListSelectionModel |
getSelectionModel ()
ÇöÀçÀÇ ¼±Åà ¸ðµ¨À» ¸®ÅÏÇÕ´Ï´Ù. |
int |
getTotalColumnWidth ()
¸ðµç ¿ÀÇ ÆøÀÇ Çհ踦 ¸®ÅÏÇÕ´Ï´Ù. |
void |
moveColumn (int columnIndex,
int newIndex)
columnIndex ¿¡ ÀÖ´Â ¿ ¹× Çì´õ¸¦ newIndex ·Î
À̵¿ÇÕ´Ï´Ù. |
void |
removeColumn (TableColumn column)
tableColumns ¹è¿·ÎºÎÅÍ TableColumn column À»
»èÁ¦ÇÕ´Ï´Ù. |
void |
removeColumnModelListener (TableColumnModelListener x)
Å×ÀÌºí¿¸ðµ¨ À̺¥Æ®¿ëÀÇ ¸®½º³Ê¸¦ »èÁ¦ÇÕ´Ï´Ù. |
void |
setColumnMargin (int newMargin)
TableColumn
¿¸¶ÁøÀ» newMargin ·Î
¼³Á¤ÇÕ´Ï´Ù. |
void |
setColumnSelectionAllowed (boolean flag)
ÀÌ ¸ðµ¨ÀÇ ¿À» ¼±ÅÃÇÒ ¼ö ÀÖÀ»Áö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setSelectionModel (ListSelectionModel newModel)
¼±Åà ¸ðµ¨À» ¼³Á¤ÇÕ´Ï´Ù. |
¸Þ¼µåÀÇ »ó¼¼ |
---|
void addColumn(TableColumn aColumn)
tableColumns
¹è¿ÀÇ ¸¶Áö¸·¿¡ aColumn
À»
Ãß°¡ÇÕ´Ï´Ù. ¶Ç, ÀÌ ¸Þ¼µå´Â ±× ¸®½º³Ê¿¡°Ô columnAdded
À̺¥Æ®¸¦ º¸³À´Ï´Ù.
aColumn
- Ãß°¡µÇ´Â TableColumn
removeColumn(javax.swing.table.TableColumn)
void removeColumn(TableColumn column)
tableColumns
¹è¿·ÎºÎÅÍ TableColumn
column
À»
»èÁ¦ÇÕ´Ï´Ù. column
°¡ Å×À̺íÀÇ ¿¸®½ºÆ®¿¡ ¾ø´Â °æ¿ì, ÀÌ ¸Þ¼µå´Â 󸮸¦ ÇÏÁö ¾Ê½À´Ï´Ù. ¶Ç, ÀÌ ¸Þ¼µå´Â ±× ¸®½º³Ê¿¡°Ô columnRemoved
À̺¥Æ®¸¦ º¸³À´Ï´Ù.
column
- »èÁ¦µÇ´Â TableColumn
addColumn(javax.swing.table.TableColumn)
void moveColumn(int columnIndex, int newIndex)
columnIndex
¿¡ ÀÖ´Â ¿ ¹× Çì´õ¸¦ newIndex
·Î
À̵¿ÇÕ´Ï´Ù. À̵¿ÀüÀº columnIndex
¿¡ ÀÖ´ø ¿Àº newIndex
¿¡ ³õ¿©Áý´Ï´Ù. ÀÌ Àå¼Ò¸¦ ¸¸µé±â ¶§¹®¿¡
Áö±Ý±îÁö newIndex
¿¡ ÀÖ´ø ¿Àº ¿ÞÂÊ ¶Ç´Â ¿À¸¥ÂÊÀ¸·Î À̵¿ÇÕ´Ï´Ù. columnIndex
¿Í
newIndex
°¡ °°Àº °æ¿ì, ¿Àº À̵¿ÇÏÁö ¾Ê½À´Ï´Ù. ¶Ç, ÀÌ ¸Þ¼µå´Â ±× ¸®½º³Ê¿¡°Ô columnMoved
À̺¥Æ®¸¦ º¸³À´Ï´Ù.
columnIndex
- À̵¿ÇÏ´Â ¿ÀÇ À妽ºnewIndex
- ¿ÀÇ »õ·Î¿î À§Ä¡ÀÇ À妽º
IllegalArgumentException
- columnIndex
¶Ç´Â newIndex
°¡ À¯È¿ÇÑ ¹üÀ§¿¡ ¾ø´Â °æ¿ìvoid setColumnMargin(int newMargin)
TableColumn
¿¸¶ÁøÀ» newMargin
·Î
¼³Á¤ÇÕ´Ï´Ù. ¶Ç, ÀÌ ¸Þ¼µå´Â ±× ¸®½º³Ê¿¡°Ô columnMarginChanged
À̺¥Æ®¸¦ º¸³À´Ï´Ù.
newMargin
- »õ·Î¿î ¿¸¶ÁøÀdzÐÀÌ (Çȼ¿ ´ÜÀ§)getColumnMargin()
int getColumnCount()
Enumeration <TableColumn > getColumns()
Enumeration
À»
¸®ÅÏÇÕ´Ï´Ù.
Enumeration
int getColumnIndex(Object columnIdentifier)
equals
¸¦ »ç¿ëÇØ ºñ±³ÇßÀ» ¶§¿¡ ½Äº°ÀÚ°¡ identifier
¿Í
µ¿ÀÏÇÑ Å×À̺íÀÇ ÃÖÃÊÀÇ ¿ÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù.
columnIdentifier
- ½Äº°ÀÚ °´Ã¼
identifier
¿Í
µ¿ÀÏÇÑ ÃÖÃÊÀÇ Å×À̺í¿ÀÇ À妽º
IllegalArgumentException
- identifier
°¡ null
ÀÎ °æ¿ì, ¶Ç´Â ÀÌ identifier
À» °¡Áö´Â TableColumn
°¡ ¾ø´Â °æ¿ìgetColumn(int)
TableColumn getColumn(int columnIndex)
columnIndex
¿¡ ÀÖ´Â ¿ÀÇ TableColumn
°´Ã¼¸¦ ¸®ÅÏÇÕ´Ï´Ù.
columnIndex
- ¿ä±¸ÇÏ´Â ¿ÀÇ À妽º
columnIndex
¿¡ ÀÖ´Â ¿ÀÇ TableColumn
°´Ã¼int getColumnMargin()
int getColumnIndexAtX(int xPosition)
xPosition
¿¡ ÀÖ´Â ¿ÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù. ¿ÀÇ À妽º°¡ ¿ÀÇ °æ°èÀÇ ¿ÜÃø¿¡ ÀÖ´Â °æ¿ì´Â -1À» ¸®ÅÏÇÕ´Ï´Ù.
Swing
ºÐ¸® °¡´ÉÇÑ ¸ðµ¨ ¾ÆÅ°ÅØÃĸ¦ »ç¿ëÇϰí ÀÖ´Â °æ¿ì, TableColumnModel´Â Å×À̺í¿ÀÌ ½ÇÁ¦·Î ȸé»ó¿¡¼ ¾î¶»°Ô Ç¥½ÃµÇ´ÂÁö¸¦ ÀνÄÇÏÁö ¾Ê½À´Ï´Ù. ¿ÀÇ ½Ã°¢Àû Ç¥ÇöÀº ÀÌ ¸ðµ¨ (ÀϹÝÀûÀ¸·Î JTable)À» »ç¿ëÇÏ´Â ºä¿Í ÄÜÆ®·Ñ·¯ °´Ã¼¿¡ ÀÇÇØ Á¤ÇØÁý´Ï´Ù. ºä¿Í ÄÜÆ®·Ñ·¯´Â ¹Ýµå½Ã ¿ÞÂÊ¿¡¼ ¿À¸¥ÂÊÀ̶ó°í ÇÏ´Â ¼øÀ¸·Î ¿À» Ç¥½ÃÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù. ¿¹¸¦ µé¾î
·ÎÄÉÀÏÀÇ ¼³Á¤¿¡ ´ëÀÀ½Ã۱â À§Çؼ ±Ý¹æ ´Ù¸¥ °÷À¸·Î ¿À» Ç¥½ÃÇϰųª »ç¿ëÀÚ
ÀÇ ¿ä±¸¿¡ µû¶ó ÀϺÎÀÇ ¿À» ¼û±â°Å³ª¶ó°í Çß´ø °Í(Àû)ÀÌ °¡´ÉÇÕ´Ï´Ù. ¸ðµ¨¿¡¼´Â ȸé»ó¿¡¼ ¿ÀÌ ¾î¶»°Ô ¹èÄ¡µÉÁö¸¦ ¸ð¸£±â ¶§¹®¿¡
ÁöÁ¤µÈ xPosition
´Â
2D ±×·¡ÇÈ °ø°£ÀÇ ÁÂÇ¥·Î °£ÁÖÇØÁöÁö ¾Ê½À´Ï´Ù. ´ë½Å¿¡
¸ðµ¨ÀÇ ÃÖÃÊÀÇ ¿·ÎºÎÅÍ ½ÃÀÛµÇ´Â ÆøÀ¸·Î °£ÁÖÇØÁý´Ï´Ù. 2D °ø°£¿¡¼ ÁöÁ¤µÈ X ÁÂÇ¥ÀÇ ¿À妽º°¡ ÇÊ¿äÇÑ °æ¿ì´Â xPosition
´Â ¾Æ´Ï°í JTable.columnAtPoint
¸¦ »ç¿ëÇÕ´Ï´Ù.
JTable.columnAtPoint(java.awt.Point)
int getTotalColumnWidth()
void setColumnSelectionAllowed(boolean flag)
flag
- ¿À» ¼±ÅÃÇÒ ¼ö ÀÖ´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â falsegetColumnSelectionAllowed()
boolean getColumnSelectionAllowed()
setColumnSelectionAllowed(boolean)
int[] getSelectedColumns()
int getSelectedColumnCount()
void setSelectionModel(ListSelectionModel newModel)
newModel
- ListSelectionModel
°´Ã¼getSelectionModel()
ListSelectionModel getSelectionModel()
ListSelectionModel
°´Ã¼setSelectionModel(javax.swing.ListSelectionModel)
void addColumnModelListener(TableColumnModelListener x)
x
- TableColumnModelListener
°´Ã¼void removeColumnModelListener(TableColumnModelListener x)
x
- TableColumnModelListener
°´Ã¼
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.