tableviewer

SWT - Table vs. TableViewer

天涯浪子 提交于 2019-12-10 12:58:16
问题 I am creating a new project using SWT. I will have 3 or 4 different tables in the project. I am fairly new to SWT and I find myself asking should I be using just the Table or should it be a TableViewer . I am wanting to learn some good guidelines on when to use just the Table and when a TableViewer is the best route. What is the benefit of using a TableViewer instead of a Table ? Should all the tables have a TableViewer ? If I am working with data from the table, is just the Table the best

How to navigate down with enter key in SWT TableViewer

余生颓废 提交于 2019-12-10 10:56:20
问题 I have a TableViewer and want the selection to go down one cell when I press the enter key, much like in MS Excel. I implemented my own CellNavigationStrategy with the following findSelectedCell . public ViewerCell findSelectedCell(ColumnViewer viewer, ViewerCell currentSelectedCell, Event event) { if (event.type == ColumnViewerEditorActivationEvent.KEY_PRESSED) { if (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR) { ViewerCell nextCell = currentSelectedCell .getNeighbor(ViewerCell

ColumnViewerTooltipSupport in SWT

↘锁芯ラ 提交于 2019-12-07 19:09:21
问题 What is the exact use of ColumnViewerTooltipSupport ? I know that it provides tooltip support for ColumnViewers but does it mean that it provides tooltip for treeViewers? How can I use this feature to provide tooltip support individually different tooltips for my each tree item when the mouse hovers over each item? Do I require a MouseListener for this or does the ColumnViewerTooltipSupport class provide it by default? Can someone please help me out here as I'm relatively new to SWT concepts.

SWT - Table Viewer - hiding columns and getting values from columns

孤者浪人 提交于 2019-12-05 21:49:44
I am trying to create an arraylist from the data in my table. I need to get the values from the visible columns, but I also need to get values from columns that are not visible in the table. Using SWT with a Table Viewer, I have no idea on how to not display columns in my table. I also have no idea on how to pull the data from the table by specifying column names. I have always used Swing, so I have always used a Table Model Class. In swing it is pretty simple to create the columns, hide them and get data from them. This is how I have done it in previous Swing projects. In my table model class

What does JFace add to SWT?

懵懂的女人 提交于 2019-12-03 08:56:50
问题 What is the difference betweem the following: TreeViewer & Tree TableViewer & Table TreeViewerColumn & TreeColumn TableViewerColumn & TableColumn When to use viewer & regular widget? PS: It would a great help if you can help me find a good resource for understanding them.Thanks in advance! 回答1: You could have titled your question "What does JFace add to SWT ?". Viewers are from JFace, Widgets are from SWT. In summary, JFace make Widgets easy to manipulate and insert into a GUI. JFace frees

What does JFace add to SWT?

孤街醉人 提交于 2019-12-02 22:57:18
What is the difference betweem the following: TreeViewer & Tree TableViewer & Table TreeViewerColumn & TreeColumn TableViewerColumn & TableColumn When to use viewer & regular widget? PS: It would a great help if you can help me find a good resource for understanding them.Thanks in advance! You could have titled your question "What does JFace add to SWT ?". Viewers are from JFace, Widgets are from SWT. In summary, JFace make Widgets easy to manipulate and insert into a GUI. JFace frees you from all the drudgery of manipulating SWT widget elements to add behaviour to static widgets. SWT just

Adding a remove button to a column in a table

岁酱吖の 提交于 2019-11-27 14:29:25
Is it possible to add a Remove button to a cell in a table? I have a table with 5 columns, I would like to add a 6th column. I want the 6th column to have a remove button in each row. Example Row: | 10002 | part | Metal | 001 | Yes | Remove | That way the user can remove any unwanted rows by just clicking the button. I have a markup column in the table and it is ComboBox . I created a class that extends EditingSupport . Would I need to make a another class extending EditingSupport , but creating a button instead of ComboBox ? EDIT public class AplotDataTableViewer extends TableViewer { public

Adding a remove button to a column in a table

拈花ヽ惹草 提交于 2019-11-26 16:45:40
问题 Is it possible to add a Remove button to a cell in a table? I have a table with 5 columns, I would like to add a 6th column. I want the 6th column to have a remove button in each row. Example Row: | 10002 | part | Metal | 001 | Yes | Remove | That way the user can remove any unwanted rows by just clicking the button. I have a markup column in the table and it is ComboBox . I created a class that extends EditingSupport . Would I need to make a another class extending EditingSupport , but