tableviewer

Virtual TableViewer sorting causes selection problems

若如初见. 提交于 2020-01-06 07:42:23
问题 Our application is an RCP appliction and needs to display table of several thousands items. For this reason, we're using SWT.VIRTUAL in our TableViewer . That works pretty well except for selection. We're having following issue : Our TableViewer support sorting and filtering. When we use a virtual tableviewer, changing the selection does not preserve the current selected item but the row currently selected.This leads to another item being selected. e.g: If Item 'A' present at the 5th row is

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

混江龙づ霸主 提交于 2019-12-22 11:16:58
问题 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

JFace ColumnWeigthData causes parent to grow

空扰寡人 提交于 2019-12-22 09:45:42
问题 I got an Eclipse RCP app and want to use dynamic column size in a TableViewer using ColumnWeigthData as ColumnLayoutData . Problem is that the parent form ( ScrolledForm in example code) grows a few pixels whenever I layout the table. To reproduce you can run the example and open/close the Section a few times. On every close the section gets wider. Why does it do this and how can I make it stop? package com.test; import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface

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

泄露秘密 提交于 2019-12-17 19:47:26
问题 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 produce it. Is there anyway to stop this from happening because it's really getting on my wick? Regards, Glen x package widgets; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse

Align an image in a SWT TableViewer

旧街凉风 提交于 2019-12-12 14:22:11
问题 I just found out, that its somehow impossible to align an image in a swt tableviewer. Creating a TableColumn with SWT.RIGHT (for instance) has no effect on that column if its labelprovider returns an image for it. Question: Is there any other way to align an image instead of modifiying the image file itself and put some extra pixel into it? 回答1: I believe that you're running into a limitation of the underlying platform (or something to that effect). You can have total control over what goes

Jubula RCP Applicaiton - Check Background Color of TableViewer Cell when Row is selected

回眸只為那壹抹淺笑 提交于 2019-12-11 13:02:44
问题 I'm trying to check a background color of a Cell or part of TableViewer's row in an RCP Application using Jubula. Certain columns in a row have their backgrounds colored based on their use in certain data structures. The application supports selection of the entire row, not a cell, and I would like to check the background color of a specific cell or group of cells in a TableViewer's row, (selected or even unselected). I can select the row by index and column value based on he column heading

How to lock swt Table or Jface tableviewer scrollbar

微笑、不失礼 提交于 2019-12-11 12:31:48
问题 I have a Tableviewer in which Objects are added really fast and I need the user to be able to select certain elements. The problem is that I can't find a way to make the scrollbar stop scrolling. I just want a button, which locks the Table at the current position. Maybe you have an answer. 回答1: [Edit] : You can use Toggle Button as Eclipse console have. You need to maintain below two states of button event. table#setSelection(item) will select the last item whichever is added.( Auto Scroll )

TableViewer shrinks to a single row with a scroll bar when new input is set

只谈情不闲聊 提交于 2019-12-11 03:28:35
问题 I am implementing a plug-in in eclipse, which reads a set of values from a database and displays it in a TableViewer inside a ViewPart . The TableViewer uses an ArrayContentProvider as shown viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER); ... viewer.setContentProvider(new ArrayContentProvider()); I also have a handler which has access to the TableViewer instance for importing data from an XML file. When the importer imports data, I

How can I get the ordered elements of a JFace's TableViewer?

寵の児 提交于 2019-12-11 01:43:44
问题 I have implemented the JFace's TableViewer sorting according to Vogella's instructions (reproduced below). It happens that the sorting is made in the graphical interface only (it is not reflected in the original data structure) and I need o get the elements in the order they are displayed in the GUI. Alternatively, an implementation which reflects the sorting in the original data structure would fit too. package de.vogella.jface.tableviewer.sorter; import org.eclipse.jface.viewers.Viewer;

How to scroll lock a Jface tableviewer?

被刻印的时光 ゝ 提交于 2019-12-10 23:41:00
问题 I have a table viewer which is updated very quickly and I want to scroll lock my table viewer as in the eclipse console view. I tried to plug-in spy the console view in eclipse but I didn't find what I was looking for Any tips to do that? 回答1: I found out the answer, thanks to someone on another forum. You only need to use the method refresh(object, true, false) to do that 来源: https://stackoverflow.com/questions/12163085/how-to-scroll-lock-a-jface-tableviewer