Topic
  • 1 reply
  • Latest Post - ‏2013-03-12T15:31:07Z by SystemAdmin
SystemAdmin
SystemAdmin
2606 Posts

Pinned topic Ordering of nodes of JViews tree layout with CSS

‏2013-03-12T14:35:30Z |
Hi all,
I'm trying to order nodes of a JViews graph via CSS with the feature introduced with ILOG 8.7 (I'm currently using the 8.8).

I've found that exist a CSS property, documented in the infocenter:
CSS example:

ilvSDMObjectComparator {
class : "ilog.views.sdm.renderer.graphlayout.IlvSDMObjectComparator";
textualSortCriteria : "data,name,ascending;data,value,descending;comparator,DESCENDING_HEIGHT;";
}

I've tried to use this CSS declaration as-is, (using only the "name" sort criteria), but I'm not able to make it working. I've also found that for making the sort working I have to set ensureModelOrdering : "false", did it and still not success. I was looking on how to associate the comparator to the layout, but I'm still not able to do this.

How can I archive this behavior?

Thanks a lot for any help.
Updated on 2013-03-12T15:31:07Z at 2013-03-12T15:31:07Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2606 Posts

    Re: Ordering of nodes of JViews tree layout with CSS

    ‏2013-03-12T15:31:07Z  
    Hi,

    To associate the comparator with the layout, use the nodeComparator property of the layout. Also, for using it with tree layout, I think you also need to disable the incremental mode. Say:

    Subobject#layout {
    class : "ilog.views.graphlayout.tree.IlvTreeLayout";
    incrementalMode : "false";
    nodeComparator : "@#nodeComparator";
    ...
    }

    Subobject#nodeComparator {
    class : "ilog.views.sdm.renderer.graphlayout.IlvSDMNodeComparator";
    textualSortCriteria : "data,name,ascendent;data,value,descendent;comparator,DESCENDING_HEIGHT,ascending";
    }

    Hope this helps
    Adrian