Hiding Vaadin Grid Headers - grid

I am using a com.vaadin.flow.component.grid.Grid in my Vaadin 14 sample app. I have added an extra header row and introduced a toggle button for changing its visibility.
Unfortunately, this led me deep down to com.vaadin.flow.component.grid.ColumnLayer, which is not visible.
I have also considered dropping the header cell contents and re-adding them. However, this just leaves a full-height row behind. I have also thought about applying some CSS, but could not find a way to, without altering the official source code.
Can anyone help with a more appropriate solution than building my own Grid version (by forking the official implementation)? This feels like pretty common grid functionality to me...

To whom might be interested about this...
I have used the dirty workaround mentioned the link shared by Tatu Lund.
However, that only works for GridSingleSelectionModel.
For GridMultiSelectionModel, the underlying implementation is rather strange.
For example, I complemented the GridSingleSelectionModel workaround with setting visibility to false on the Un/Select All checkbox the GridMultiSelectionModel generates. This seems to have a listener on it and automatically hides the checkboxes generated by the GridMultiSelectionModel on each row. Which is similar to GridNoneSelectionModel, so unusable if you need to be able to select items.
Unfortunately, I have trusted that Vaadin 14 should be pretty mature by now, but as I explore it I find myself in the position to rather choose version 8, for instance.
It's not the first issue of this kind and, that being said, I am not sure I understand why is Vaadin releasing new major versions every so often, while they don't seem to be able to deliver a comprehensive, stable and reliable option to their adopters. Vaadin 8 is almost 5 years old, and it looks like no later version is even close to it.

Related

DataGrid-like Control that supports vertical columns, with fixed headers?

This question has been asked before over the years, but the solution proposed to just flip the dataset does not address the issue with the column headers not being fixed. Consequently, when scrolling, the headers disappear to the left. The real solution should be implemented in the control itself. So either I find a control that offers that or I will have to code the whole control myself. I'm wondering if that control already exist. Side note : I need this control to work smoothly with many records.
I decided to create a brand new control that implement the grid from scratch, using gdi+ to draw the cells. Much more flexible and also waaaay faster rendering. Implementation is still on the way.

JavaFX Datagrid

Im in the verge of starting a new RIA development. We've been using Flex/Flash for the last 2 years but we were considering using a more OS approach so we though giving JavaFX a try since it seams the only solid option available. However after a couple of days of research we found out that there is not such thing as a datagrid for it, at least not in the core API. For those unfamiliar with Flex, a Datagrid is a component that allows you to display a collection of data in column-row layout (much like a HTML Table on steroids). The beauty of it is that you only need to worry about the data itself as the component does pretty much the rest (sorting, column dragging, etc).
Im afraid to ask... but is there something slightly similar for JavaFX?
We require nothing as fancy as Flex Datagrids/AdvancedDatagrids, we only require a easy, straight forward way to display grids of data that are able to have a little of interaction like clicking, sorting and that are able to display images, buttons, etc. without having to download a ton of different jars.
If there isnĀ“t something out there... This would be a shot in the back of the head to the idea of giving javaFx the chance to compete with flash on our project (which is sad).
I really cant believe the SUN people didnt include something like this on the core API...
There is currently no datagrid you can use JTable for that. Such a thing should be available in the next release of JavaFX I think. See my answer here for more information about available JTable implementations. You mentioned the JFXtras project with that you are able to embed those Swing components into JavaFX.
There are external companies selling such a component. E.g. do a web search or look here
For apache pivot you should ask them directly for the pros and cons; they are very responsive and honest.

Customising Flex Datagrid or alternative solutions

I'm currently building an application that is presenting tabular (fetched from a webservice) data and have squirted it into a datagrid - seemed the most obvious way to present it on screen.
I've now come across a few limitations in the datagrid and wonder how I might move forward. As a relative newcomer to flex development I'm a little lost.
A few things I am wanting to do.
The data is logically split into groups and I would like to be able to have subheadings in the grid whenever I move to a new group.
I would like to be able to highligh individual cells based on their content relative to other values in the row - ie highlight the cell with the highest value in the row.
Is this possible with the standard datagrid?
I'm actually using the try-before-you-buy version of flex builder at the moment but I have ordered Flex Builder 3 Pro - which is on its way to me. I understand there is an 'advanced datagrid' control in this version - perhaps that will support some of what I wish to do?
Alternatively - is there another way of building custom tabular data?
stay the hell away from Adobe's AdvancedDataGrid. You will learn quickly it has many shortcomings, you will think you are better than it and override a few things here, tweak a few things there, but in the end the ADG will absolutely destroy you. Heed my call and avoid this at all costs. The ADG was outsourced by Adobe to their failed Indian team that has sense been disbanded, it alone counts for over %30 of the entire flex framework, and their are horrible deeply rooted issues that are better off starting over at this point. STAY AWAY FROM THE ADVANCDEDDATAGRID AT ALL COSTS!!!!!
The DataGrid is the best bet for that, but also check out the AdvancedDataGrid (here are some AdvancedDataGrid Demos with Source from FarataSystems).
(source: flexicious.com)
Both the DataGrid and AdvancedDataGrid are notoriously hard to customize, and everything you'd like to do is pretty advanced, so it will take a while to get going, but you can do it eventually.
There's no other way to build tabular data unless you start doing some advanced things with some of the data visualization libraries out there.
Good luck,
Lance

Flex Text Control Undo

I'm having trouble finding any resource for adding ctrl-z undo capability to a Flex RichTextEditor control (a lack it apparently shares with other Flex text controls). I'm baffled that it's not in the native forms because it's such a fundamental capability, available in even standard browser text controls I believe.
Any mention of this issue on the Flex sites (there are several) conflict; one says the issue is "Closed" and the resolution is "External" (whatever that means).
Does anyone have any insight to offer? I've got an app the heavily requires extensive text editing. Flex in general works nicely, but this trivial lack is just about fatal, as anyone would imagine.
An example using the Flight Framework to easily implement undo/redo can be found here: http://www.xtyler.com/code/163
I've read elsewhere -- in fact, in the answers to one of my questions on SO -- that the issue is not going to be resolved in Flex 3. Which seems to be correct since we are in 3.2 or maybe even beyond that, and there's no undo in sight.
I was brave/stupid enough to implement an undo-redo in this component myself. At that time I was working on Windows. Now I'm on OSX and I realize just how non-cross-platform my solution is. The very statement of the problem (adding ctrl-z undo capability) is a large part of the problem (OSX has control AND this Apple key thing). Now I have to check how much work it would be to make the thing cross-platform... could be trivial.
By amazing coincidence, just today I've been thinking about NOT using the RichTextEditor but rather something external (FckEditor comes to mind) because the RTE leaves so much to be desired (hence I arrived at your question). I've worked with the RTE a ton and gotten it to do a lot of what I want, but I still wonder why they didn't "finish" this component...
Flex 3 controls do not natively support undo/redo. Here are a couple of libraries that may be of interest to you:
flexundoredo
as3undohistory

Custom style with Qt

Has anybody experience in building a custom style in Qt? What I have in my mind is a complete new style that affects all kind of widgets. I have seen some examples in the web for a custom combo box. But I have no idea how much time and code it takes to build a "complete" new custom style ... maybe someone can give me a hint.
We think of using Qt 4.3 (or even newer) ...
Check out the Stylesheets facility in Qt 4. While it's still a hassle, it's way easier than doing a full-on custom style. You can just adjust one visual facet at a time and try it out.
It pays attention to inheritance. So if you style the font in QWidget, then every visual widget will also use that font. And so on.
I have developed a "new" style that changed the appearance of much of an application. It did take some time, and quite a bit of experimentation. I also derived my style from the generic windows style, to allow it to handle some of the stuff I didn't want to mess with. All told, I think it took me a week to get most of what I wanted, with practically no prior exposure to the styles.
In order to actually develop one, I would get into the source for their styles example, which has a "wood" style. I put my own style in place of the example style, and started changing things while using the example program to check how it looked. Depending on how you are developing it, you might want to have a configuration file so you can easily change some of the values without recompiling.
You might want to look at existing styles. You can find quite a few of them on kde-look.org, in the Styles / 4.0 section.
We've done it in the past (in Qt 3), and it's extremely time-consuming. We had a lot of problems with flickering, redraws not working the way we expected, sluggish behavior, bugs in the Qt implementation. It a lot less straight-forward than it seems, and there's little support or user experience too. Unless you need something really particular (as we did), I'd say it's not worth the trouble.
Other frameworks are supposed to make it easier (some Java-based?), but I don't have first hand experience.
If you don't need to radically change the widget style, you might want to try using widget style sheets:
http://doc.qt.digia.com/4.4/stylesheet.html

Resources