各位,我現(xiàn)在用到了ICellEditorListener接口的applyEditorValue()方法,在這個(gè)方法中,我想使用加上此監(jiān)聽(tīng)器的 CellEditor 的 text,請(qǐng)問(wèn)有沒(méi)有辦法?
FeedBack:
2007-10-23 12:02 | 留戀
可能我說(shuō)的不是很清晰,我在詳細(xì)地說(shuō)一下:
我的代碼如下:
final CellEditor[] cellEditor = new CellEditor[2];
cellEditor[0] = null;
cellEditor[1] = new TextCellEditor(table);
ICellEditorListener celleditorlistener = new ICellEditorListener(){
public void applyEditorValue() { }
public void cancelEditor() {}
public void editorValueChanged(boolean oldValidState, boolean newValidState) {}
};
cellEditor[1].addListener(celleditorlistener);
我的目的是在對(duì)一個(gè)單元格修改后比較修改前后的內(nèi)容,但是我不知道怎么獲得每次修改前的內(nèi)容。
謝謝 回復(fù) 更多評(píng)論
我的代碼如下:
final CellEditor[] cellEditor = new CellEditor[2];
cellEditor[0] = null;
cellEditor[1] = new TextCellEditor(table);
ICellEditorListener celleditorlistener = new ICellEditorListener(){
public void applyEditorValue() { }
public void cancelEditor() {}
public void editorValueChanged(boolean oldValidState, boolean newValidState) {}
};
cellEditor[1].addListener(celleditorlistener);
我的目的是在對(duì)一個(gè)單元格修改后比較修改前后的內(nèi)容,但是我不知道怎么獲得每次修改前的內(nèi)容。
謝謝 回復(fù) 更多評(píng)論
只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。 | ||
![]() |
||
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問(wèn)
管理
|
||
| |||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
---|---|---|---|---|---|---|---|---|---|
30 | 1 | 2 | 3 | 4 | 5 | 6 | |||
7 | 8 | 9 | 10 | 11 | 12 | 13 | |||
14 | 15 | 16 | 17 | 18 | 19 | 20 | |||
21 | 22 | 23 | 24 | 25 | 26 | 27 | |||
28 | 29 | 30 | 31 | 1 | 2 | 3 | |||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
常用鏈接
留言簿(1)
隨筆檔案
搜索
最新評(píng)論

- 1.?re: 請(qǐng)問(wèn)如何去除選中Tableview某一行后的高亮顯示
- 有人知道嗎?
- --留戀
- 2.?re: 如何Wizard屬性,使用戶無(wú)法用鼠標(biāo)拖拽的方式改變其大小
- 有人知道嗎?
- --留戀
- 3.?re: 如何Wizard屬性,使用戶無(wú)法用鼠標(biāo)拖拽的方式改變其大小
- 頂一下
- --留戀
- 4.?re: 請(qǐng)問(wèn)如何去除選中Tableview某一行后的高亮顯示
- 頂一下
- --留戀
- 5.?re: 關(guān)于ICellEditorListener接口的問(wèn)題
- 評(píng)論內(nèi)容較長(zhǎng),點(diǎn)擊標(biāo)題查看
- --留戀