A GWT CellTable with frozen header and initial column - gwt

I need to freeze the first column and first row of data in a CellTable, so that users can scroll through the data but still see the labels on the "axes." The first column should scroll when the user scrolls up and down, and the header row should scroll when the user scrolls left and right. Think "Freeze Panes" in Excel.
I'm using GWT 2.1 and am willing to write my own widget to do this if no solutions already exist. My question is a two-parter:
Do any widgets already have this behavior?
Any suggestions if I'm going to implement this myself?
Thanks!

I implemented a solution myself. Check out http://larkolicio.us/ScrollTable/ExperimentTables.html
It's a LayoutPanel with three AbsolutePanels inside it. The frozen columns are a CellTable, the main part is a CellTable, and the header is a Grid - I could find no way to set the width of a CellTable column! A ScrollHandler links the main part to the two frozen parts. There is a little bit of delay - I'd appreciate it if someone could find a way to get rid of the lag between the sections.
I got it working to a point that I could use it, and stopped. It is not a general-purpose widget. Please feel free to use it at your own risk.

This implementation is quite good. I have just tested it. It however needs some changes made to support asynchronous loading. GWT Issue 188 covering similar request for enhacement was created on Oct 2006?!
Thanks for sharing.

Related

Flutter/Dart Datatable or Sliver with fixed header and fixed row header

So I want to create a data view for a Flutter app that incorporates a datatable or sliver (or anything really) with a fixed header when scrolling vertically and also fixed row headers when scrolling horizontally. I tried messing around with the data_table_2 and table_sticky_headers plugins, but they don't do exactly what I want. I'm hoping someone can point me in the right direction or help come up with a solution.
Here's a gif image showing what I want to achieve...
Data View Idea
I figured it out. It was pretty simple actually, using nested Stack's and SingleChildScrollView's. No plug-ins required.
Here's a link to the example source code if anyone is interested...
https://github.com/jstoyles/flutter_data_view_idea

Turning scrollbar, ListView into timeline slider

I've been seeing this UI technique quite often at Dribbble, mostly demonstrated on iPhone as timeline, and I am really wondering if it's possible to do so on Android. The idea is to exploit scrollbar, make it activate each row it is passing.
Consider these schematics of a list of contact.
The first one is the list (photos on the left side, names on the right) split roughly in the middle with scroll track.
The scrollbar cannot expand and has to be smaller than the smallest row. I believe it is possible to produce this kind of arrangement by combining two listviews and make them roll together.
The second one shows the screen when scrolled and when the scrollbar moves to the second row. After it stops, the second row will expand its height. All hidden elements there like address, phone, etc will show up. Also, the moment the scrollbar leaves the first row / hits the second, the first row will toggle off. It will shrink and remove all elements except name.
I have been thinking about this scenario and one key question in this technique is whether the scrollbar has the ability to activate the row it hits. The only tool I know in regard to scrolling is onScrollListener but I wonder if it's sufficient. Does anyone have any insight into such scenario ?
Thank you in advance.
I've been seen something similar to this in lots of applications. Some of them are just using ListView with design tricks to look like that, others with custom views or something else. The idea which I have in my about this implementation is using two Fragments: left and right which are placed in one FragmentActivity. Left Fragment will be your image holder, where for example you will have a ListView or some other view depending on your choice which will communicate with the Right Fragment and when LeftFragment's ListView stop scrolling, fire an event to RightFragment's ListView to scroll to position 5 for example and expand that item. Not really sure if it's the best option and if it will work properly as you want, but that's the first idea which I can think of to do some implementation like this.
Hope this help you find the right answer.

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.

Is there a tree control for the iphone?

Is there a Tree control available for the iphone?
I need to represent a tree with sub nodes in a tree, how can I do it?
Thanks
No tree widget by default. It's basically not there because you shouldn't really need one and most cases it should probably be avoided.
A table navigation controller is the most common way to navigate down nodes in a hierarchy/tree usually.
It's hard to fit a tree like control we have on our desktops in the touch world where you have huge fingers (so huge nodes) and with the nodes offset to show depth, there isn't much space left over. Adding it to the iOS environment would create a weird UX flow so I would probably rethink my design flow if I think I need one.
If you need to fake it, you can use a table view and offset the left side of each subitem with some padding to show depth.
See this help
Rolling your own iPhone treeview control
part 1 : http://dotnet.kapenilattex.com/?p=566, part 2 and part 3 are in the pages : 585 and 633
part 4 : http://dotnet.kapenilattex.com/?p=648&cpage=1#comment-59842
I would use a UITableView and expand and collapse items further down the tree. You can set an indentation level for each UITableViewCell as it is displayed, depending on its position in the tree. You would need to keep track of which items in the tree are expanded/visible in order to always provide the tree with the correct data.
I just did just that for a project. Unfortunately I am not at liberty to share the full code. But it should not be terribly hard to write.
Let us know if you find an out-of-the-box solution.
From what I see, the best solution for my problem will be a BreadCrumbs control. I am looking for a ready solution of breadcrumbs, but if there isn't, it is not a big deal to write it.
OK, I did it.
I added a WebView and I am adding to it the crumb list. The design is similar to the Apple's official site.
When a user clikcs on the link, I call the popToViewController function and I am there.
This prevent the user from clicking Back and Back.
Hope this will help somebody.

GWT & IE8 cause a very laggy table-behavior

I've yet another question. I'm working with GWT 2.0.4 and IE8 as well as FireFox (the latter only for comparison purpose). My application needs to load data and show it inside a table. There are about 60 columns and 150 rows to show.
Since the loading is dynamic - as soon as a dataset has been fetched, it's added to the table - I'm fine with slowdowns during loading process. However: when the table is completely loaded, I'd expect it to be pretty snappy and let me scroll it without much lag.
While the loaded table reacts in FireFox pretty good - it stays very responsive - Internet Explorer 8 is causing me a lot of headaches. In particular: as soon as the table finished loading and I try to scroll around or highlight a row, IE8 becomes VERY laggy and highlighting a row makes IE8 consume 50+% of CPU power.
I am not using any 3rd-party libraries and even displaying empty cells in a FlexTable still gives me the same issue.
I found some probably related issue here: SmartGWT ListGrid is slow, but only in Internet Explorer . Unfortunately neither the issue there, nor the supplied links for SmartGWT solved my problem as I am not using SmartGWT. I do believe though that the problem is related.
I'd be happy to try any suggestions.
If it's possible (and your description of the problem suggests so), use Grid instead:
A rectangular grid that can contain
text, html, or a child Widget within
its cells. It must be resized
explicitly to the desired number of
rows and columns.
Have a look at bulk table renderers # GWT Incubator for a comparison of these approaches (it's a little dated, but the point that FlexTable is slower than Grid still holds ;)). The "bulk rendered" tables from the incubator are also an option, however keep in mind that those widgets might not be maintained any more (and for example, contain bugs) - or are rapidly maintained :D But looking at the source might at least point you in the right direction, if you wanted to roll out your own solution to this problem.
highlighting a row makes IE8 consume 50+% of CPU power.
Maybe it's because you added mouse listeners to every row in your table. If so you could use :hover-pseudo-class in your css-files.
This article maybe helpful if you need to handle Events from a bunch of widgets in your table: http://code.google.com/intl/en/webtoolkit/doc/latest/FAQ_UI.html#As_the_application_grows,_event_handlers_seem_to_fire_more_slowl