[英]add selection listener to the rows of the jface tableviewer table without allowing multiple selection
[英]JFace: how to add multiple selection to a cell in a TableViewer
這個問題是關於如何將多選ComboBoxCellEditor
或多個BooleanCellEditor
到TableViewer
的單元格。 主要目的是在一個單元格中進行多項選擇。
我正在使用http://wiki.eclipse.org/index.php/JFaceSnippets和http://www.eclipse.org/swt/snippets/上的代碼段,現在我有了一個使用TableView
進行所有編輯的相當不錯的Table支持,標簽提供者,內容提供者。 現在,在單元格內部有一個TextCellEditor
或ComboBoxCellEditor
。
問題是:我想要多個選擇,但我不知道如何選擇。
org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor
的代碼似乎具有多項選擇,但是在嘗試使用外部Nebula類時,我始終遇到java.lang.NoClassDefFoundError
JFace片段Snippet061FakedNativeCellEditor
我提供了一個復選框,並且很難使該代碼適應我的代碼。
非常感謝。
您沒有將那些星雲JAR /項目添加到您的構建路徑/運行時中。
您必須擴展自己的CellEditor
。 在其中,您基本上可以創建任何想要的東西,只要它是Control
。 我很確定您可以在CellEditor
的createControl
保護的方法中偷偷使用多個小部件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.