
salix
Salix - alternative GWT Tree
Simple tree similar to GWT Tree
created to achieve a few simple goals:
* hover/selected highlighting of the whole row, not just the item itself (by default GWT styles are used, can be changed via TreeConfig
)
* whole row is clickable as well
* stupid focusing is not messing with horizontal scroll bar
* connectors, customizable expand/collapse/connector icons (via TreeConfig
)
* automatic sorting via comparator on Tree
(via TreeConfig
) or on TreeItem
We're now working on first official version, but it is working even today if you checkout and build it. Requires GWT 2.0.
How to migrate from default GWT Tree?
If you're lucky you should be OK with following imports - they should override default Tree:
import com.googlecode.salix.client.Tree;
import com.googlecode.salix.client.TreeItem;
Of course, don't forget salix-1.0.0.jar
on your path and following line in your GWT module file:
<inherits name="com.googlecode.salix.Salix"/>
If you ever set display of the TreeItem
to block via getElement()
construct, you have to comment these out/remove - they are not necessary anyway. You also may have to comment unsupported features, or port them into Salix, or wait while we do it (file an Issue then).
Finally you have to add following line when your tree is about to be displayed:
tree.draw();
With explicit draw the execution is faster than we could do without it. When the tree is drawn, you can freely add new TreeItems
, they will be drawn without additional effort. If you draw tree ASAP and add tons of nodes to it, execution will be extremely slow. This is not on our radar now, so we're not willing to fix this. :-)
What is NOT working?
A lot of things now, actually...
* animation,
* getElement()
on TreeItem
,
* any handlers except the select one, ...
* and many other things we never used on the tree so far.
Why FFS?! Why another Tree?
Because GWT-Ext is dead, SmartGWT is unusable unless you rewrite the whole project in it (layout issues), Ext GWT is not LGPL and we didn't find any other Tree that is GWT conforming (supports widgets, etc). That's why.
Why we put it here? Because maybe someone else will find it and like it.
Project Information
- License: GNU Lesser GPL
- 5 stars
- svn-based source control