Questions tagged [tableviewer]

Eclipse JFace TableViewer component, concrete viewer based on a SWT Table control.

216 questions
15
votes
1 answer

What does JFace add to SWT?

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…
Reddy
  • 1,560
  • 6
  • 25
  • 31
14
votes
2 answers

Best Practices - SWT Table, TableViewer, EditingSupport

I am adding a table to my main GUI. It does show up and has the data it is suppose to show. But I feel like I have a big mess of code and it is not structured correctly. I am looking for someone that uses SWT a lot to help me put the right pieces of…
jkteater
  • 1,331
  • 3
  • 33
  • 66
13
votes
5 answers

Using Eclipse TableViewer, how do I navigate and edit cells with arrow keys?

I am using a TableViewer with a content provider, label provider, a ICellModifier and TextCellEditors for each column. How can I add arrow key navigation and cell editing when the user selects the cell? I would like this to be as natural a behavior…
JeffV
  • 47,302
  • 31
  • 96
  • 120
8
votes
4 answers

Adding a remove button to a column in a table

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 | …
jkteater
  • 1,331
  • 3
  • 33
  • 66
7
votes
3 answers

SWT - Table vs. TableViewer

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…
jkteater
  • 1,331
  • 3
  • 33
  • 66
6
votes
1 answer

Strange alignment and layout in tableviewer with image

I use a TableViewer with two columns. The first should contain text and the second an image depending on the state of the object. The label provider is a custom provider which extends LabelProvider and implements ITableLayoutProvider. When no image…
MatF
  • 1,708
  • 2
  • 15
  • 31
6
votes
2 answers

Why do we need ContentProviders for JFace Viewers (TableViewers specifically)?

I have always wondered why we exactly need ContentProviders for JFace TableViewers? I know that getElements() method of a ContentProvider class will return an Array or Collection of Objects which corresponds to rows on the table and getElements will…
Sangli
  • 135
  • 1
  • 13
6
votes
3 answers

TableViewer, defining an initial sorting order has no effect on data

pratically I build up a tableviewer as usual, but initially it does not sort all the rows according the column defined for sorting. The code I am…
Steel Plume
  • 2,190
  • 3
  • 24
  • 35
6
votes
3 answers

Putting an image in to a JFace table Cell is causing gap for image to appear in first column

So I have a problem, when I add an image to any column of a JFace table the first column also behaves like it has an image in and the text is indented by the size of that image. Here's a screenshot illustrating my point with the code needed to…
Link19
  • 884
  • 1
  • 17
  • 43
5
votes
1 answer

swt table turn off sort arrows in column header

I have the following code which allows the columns in my table to sort by ascending or descending order. protected void setSortColumn(GridPanelColumn gridPanelColumn, TableColumn column) { table.setRedraw(false); // check if already…
codegurl
  • 131
  • 3
  • 5
4
votes
2 answers

How can I set the selection on a swt table using setSelection and setting reveal to false?

I'm trying to select some items in my table, but I DON'T want them to be revealed. The problem is that calling the method (seen below) automatically results in showSelected() being called inside of Table.class and that is not what I…
codegurl
  • 131
  • 3
  • 5
4
votes
3 answers

how to delete selected rows (multiple rows) from CheckboxTableViewer when button clicks? (table is connected to oracle database)

i hava a CheckboxTableViewer which has 10 columns, and the table is filled from database, and i have a button outside the table named as "Delete", what i want to do is:- when i select rows using check box (multiple selection also) and when i press…
Shenoy
  • 737
  • 3
  • 11
  • 28
3
votes
1 answer

Widgets in JFace TableViewer cells?

I am developing an application using JFace on Eclipse 3.6 and I would like to have actual widgets - mostly checkboxes and buttons - in a TableViewer. Everything I have found seems to suggest that this is not possible at the moment. My current…
thkala
  • 76,870
  • 21
  • 145
  • 185
3
votes
2 answers

Make a JFace TableViewer resize with it's surrounding composite?

Using the WindowBuilder for Eclipse, I have created a TableViewer which I have placed inside a composite. (The TableViewer creates an SWT Table, in which the TableViewer itself is inserted). I have tried to make the composite resizable by setting…
Samuel Lampa
  • 4,146
  • 4
  • 37
  • 62
3
votes
1 answer

ComboBoxCellEditor - get rid of the text box?

I have a TableViewer with a ComboBoxCellEditor. When I click into the cell, first I get a text box (similar to the TextCellEditor) with an arrow next to it. If I click the arrow, I get the drop down list with the values I put into it. Is there any…
chama
  • 5,537
  • 13
  • 57
  • 72
1
2 3
14 15