nattable

2 Image in root of tree in nattable

﹥>﹥吖頭↗ 提交于 2019-12-12 04:59:12
问题 I have inserted one image in the tree body in one of my columns with new TreeImagePainter(true, GUIHelper.getImage("right"), GUIHelper.getImage("right_down"), image); in class TreeConfiguration , but I need to add one more image beside root rows. Moreover I need to dynamicly obtain this image from some other class, where data is already read . As it turns out i can't because either this class is null or it is called later than it should. Could you guild me how to do that. Kind Regards 回答1:

nattable combobox filter header with group by

一世执手 提交于 2019-12-12 04:22:37
问题 I am trying to implement nattable with "ComboBoxFilterRowHeaderComposite". Filtering is working fine but after filtering rows when I try to do group by, it throws following exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.remove(ArrayList.java:492) at ca.odell.glazedlists.FunctionList.listChanged(FunctionList.java:283) at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire

How to use Nebula NatTable's PreserveSelectionModel?

北战南征 提交于 2019-12-12 03:08:17
问题 I am developing an RCP Application, and am using Nebula's NatTable for that. When it comes to selection, I am failing to understand how I am supposed to use it. What I want is: I want to have entire Rows selected. I was able do that using the RowOnlySelectionConfiguration and the RowOnlySelectionBindings . If I select a row, I want the selection to stay there and not be cleared when some data in that row gets updated. How do I do that? If a row is selected, and the position of the element in

Resizable row/column headers in NatTable

我只是一个虾纸丫 提交于 2019-12-12 02:35:15
问题 I have NatTable with column and row headers, and use CornerLayer for it. How to make row and column headers resizable like any other column or row? 回答1: You need to register the necessary bindings to the header regions gridLayer.addConfiguration(new AbstractUiBindingConfiguration() { @Override public void configureUiBindings(UiBindingRegistry uiBindingRegistry) { uiBindingRegistry.registerFirstMouseMoveBinding( new ColumnResizeEventMatcher(SWT.NONE, GridRegion.ROW_HEADER, 0), new

How to set custom style to some columns in a nattable?

五迷三道 提交于 2019-12-11 23:58:21
问题 I need to set a custom style not for all, but some columns in a nattable. I can't set the configuration like this: natTable.addConfiguration(new DefaultNatTableStyleConfiguration()); because this sets the configuration to the whole table. I have to override the configuration only to specific columns. In my case the columns should have the horizontal align set like this: setHAlign(HorizontalAlignmentEnum.RIGHT); How can I achieve this? Thanks! 回答1: From NatTable styling docs To enable

Scroll NatTable programmatically

社会主义新天地 提交于 2019-12-11 01:54:19
问题 First question on stackoverflow ;-) Similar question to here, only I am trying to scroll a NAT-Table programmatically. I can neither show a selected Item, nor set a value to the Scrollbar itself (via getHorizontalBar or similar). The internet wields no answers, as far as I could see, and solutions suggested for other swt controls do not seem to apply... 回答1: That depends on what you are trying to achieve. Do you want to select a cell and move it into the viewport, or do you simply want to

Sorting of tree implemented with NatTable

不打扰是莪最后的温柔 提交于 2019-12-08 04:08:50
问题 I'm trying to implement sorting of tree implemented with NatTable but I can't really understand how it works. My problem is that after the sorting of any column other than 'tree' column child nodes can move to invalid parent. Though the order of elements is correct on all levels of hierarchy. So basically I don't understand the purpose of TreeList.Format.getComparator() and how it related to comparators registred for the columns, and I don't understand when and why node can change its parent.

Delete rows from Nattable

一世执手 提交于 2019-11-29 18:36:53
I want to implement a row deletion logic in a Nebula Nattable. This is what I plan to do: Add context menu to the Nattable which is described in http://blog.vogella.com/2015/02/03/nattable-context-menus-with-eclipse-menus/ Add an SWT Action to the menu which will implement the delete my question is, which is the best way to accomplish this: Should I delete the corresponding value from my data model and the table view is refreshed when I execute this.natview.refresh(); ? OR Should I get the rows from SelectionLayer and delete them (if so how do I do ?)? OR is there any default support for this