[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [rap-dev] Re: PropertySheetEntries Sorting Order?
|
Hi Alexey,
really nice to hear what you're doing here. Sounds very promising. What
I don't understand is your "sorting problem". The tree itself does not
have any sorting mechanism (neither in SWT nor in RWT). So I really
wonder what's the problem here. I imagine you're using the getBounds
method of the TreeItem to determinate the location where you place your
celleditors. One known issue there is that the y coordinate is relative
to the tree widget itself and not it's client area. In turn this means
that you need to add the header spacing to the y coordinate
(Tree#getHeaderHeight). If you can show us some sample code to reproduce
the error I'm very interested to help!
Just a sentence about the tree itself: The java fascade which provides
the API is org.eclipse.swt.widgets.Tree. This manages the treeitems and
stuff. In the rendering phase, the TreeLCA class helps to synchronize
the server and client state and the same applies to TreeItemLCA. On the
client side, the Tree.js / TreeItem.js are only wrappers around the
original qooxdoo implementations to enhance them with stuff like tree
headers and proper column handling.
I'm looking forward to see some of your stuff regarding cell editors!
Greets
Benny
Alexey Litvinuke wrote:
Hi Everyone!
I've finally introduced sorting of TreeItems in Tree's in order to
temporary resolve this problem as I asked about in my previous message.
To get TreeItems sorted by label (text) you need to add code for
sorting inside TreeItem.js in setTexts() function. This is because you
need texts set before sorting by them. Hence I do sorting of this
newly created TreeItem and all its siblings and then apply sorted
array of items to their parent.
This is kind of hack to get done what I need here. And what would be
great is to have some mechanism of sorting tree items inside of Tree
itself as part of API. Thus we can predict in which order items are
placed in tree and work with it.
I am very concerned to help with tree items sorting and celleditors
(especially for trees) and can contribute some of the code I have here
to RAP project. Its very imprortant to me (and to others too, I am
sure) to have those things included in very close future releases of
RAP. And this way I don't need to re-merge my changes with new
releases of RAP anymore ;)
Thank you,
Alex.
On Dec 26, 2007 1:23 PM, Alexey wrote:
Hi!
I've faced with a problem of sorting order of PropertySheetEntries
in PropertySheet (EMF implementation with Tree object as a Viewer
control).
I am implementing CellEditors and they work fine for me in whole.
The ploblem is that I can't control and get the correct order of
entries which will occure in PropertySheet.
I need the order of entries to get index of selected element in
tree (2 column tree) to know where to place my cell editor.
Because of my PropertySheetViewer control is Tree - I can't just
get selected index but only selected object.
In most cases order of how entries are displayed by RAP in HTML is
equal to what we have in Java in
"selectedPropertySheetEntry.getChildEntries()".
But in some cases they don't and only for some elements - and this
finaly result with incorrect cell editor placement when I am
activating it for selected item.
Here is an screenshot of what I am talking about:
http://img205.imageshack.us/my.php?image=propertysheetexamplebz1.gif
<http://img205.imageshack.us/my.php?image=propertysheetexamplebz1.gif>
You can see that in this particular case when I try to edit one
property - it opens correct celleditor but in not correct location
- because of the differences in order of element I have in Java
code (selectedPropertySheetEntry.getChildEntries ()) and the way
RAP renders them in HTML.
Can you suggest something how to avoid this problem?
Any links to source code where and how RAP makes this sorting and
why it is different from what I see in Java?
Thank you in advance.
------------------------------------------------------------------------
_______________________________________________
rap-dev mailing list
rap-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/rap-dev