<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Discussion</title><link>https://sourceforge.net/p/prefuse/discussion/</link><description>Recent posts to Discussion</description><atom:link href="https://sourceforge.net/p/prefuse/discussion/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sun, 03 Jun 2018 20:13:20 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/prefuse/discussion/feed.rss" rel="self" type="application/rss+xml"/><item><title>Sorting a TreeView alphabetically per depth level</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/d391486e/?limit=100#20d7</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
it is long time ago, so I can hardly remember.&lt;br/&gt;
In general I'd try this way:&lt;br/&gt;
&lt;em&gt; create your own &lt;code&gt;prefuse.visual.sort.ItemSorter&lt;/code&gt;&lt;br/&gt;
&lt;/em&gt; overwrite its &lt;code&gt;score&lt;/code&gt; method to implement custom sorting&lt;/p&gt;
&lt;p&gt;In your special case, it might be more feasible to directly subclass &lt;code&gt;prefuse.visual.sort.TreeDepthItemSorter&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The javadoc for the &lt;code&gt;score&lt;/code&gt; method in &lt;code&gt;ItemSorter&lt;/code&gt; reads:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    /**
     * &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Return an ordering score for an item. The default scoring imparts
     * the following order:
     * hover items &amp;gt; highlighted items &amp;gt; items in the
     * {@link prefuse.Visualization#FOCUS_ITEMS} set &amp;gt;
     * {@link prefuse.Visualization#SEARCH_ITEMS} set &amp;gt;
     * DecoratorItem instances &amp;gt; normal VisualItem instances. A zero
     * score is returned for normal items, with scores starting at
     * 1&lt;span class="ni"&gt;&amp;amp;lt;&amp;amp;lt;&lt;/span&gt;27 for other items, leaving the number range beneath that
     * value open for additional nuanced scoring.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt; 
     * 
     * &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Subclasses can override this method to provide custom sorting
     * criteria.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
     * @param item the VisualItem to provide an ordering score
     * @return the ordering score
     */
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The source code is pretty well readable, may be worse a look...&lt;/p&gt;
&lt;p&gt;Hope that helps,&lt;br/&gt;
Björn&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Kruse</dc:creator><pubDate>Sun, 03 Jun 2018 20:13:20 -0000</pubDate><guid>https://sourceforge.net7946bed3df78030a9ef2f3894218f13f24320ed6</guid></item><item><title>Sorting a TreeView alphabetically per depth level</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/d391486e/?limit=25#7106</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Could I please ask for your perspective...?&lt;/p&gt;
&lt;p&gt;Using the standard &lt;code&gt;prefuse.demos.TreeView&lt;/code&gt; example (incl. &lt;code&gt;NodeLinkTreeLayout&lt;/code&gt; and &lt;code&gt;CollapsedSubtreeLayout&lt;/code&gt;), I was surprised to see that the Nodes are not sorted alphabetically per depth level, see:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;https://imgur.com/a/DGNLm5A
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I would expect both the fruit list and the animal list to be sorted alphabetically, which is something I would like to achieve. &lt;/p&gt;
&lt;p&gt;Trying to understand what happends, I have a few considerations:&lt;br/&gt;
- I've looked into &lt;code&gt;prefuse.visual.sort.TreeDepthItemSorter&lt;/code&gt;, but it seems this has to do with how different Nodes are drawn over or under each other; &lt;br/&gt;
- I've noted &lt;code&gt;prefuse.data.util.Sort&lt;/code&gt;, but I was under the impression that data is decoupled from the visual representation (see: &lt;a href="http://prefuse.org/doc/manual/introduction/structure/" rel="nofollow"&gt;http://prefuse.org/doc/manual/introduction/structure/&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Has anyone solved this problem before? Your thoughts are much appreciated. &lt;/p&gt;
&lt;p&gt;Many thanks...!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mark</dc:creator><pubDate>Tue, 15 May 2018 17:49:12 -0000</pubDate><guid>https://sourceforge.net5cb74e4c791e819ff50526c478cdcb08db4805d5</guid></item><item><title>Using refuse in Android</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/016ae591/?limit=25#3755</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;How can i use prefuse in Android Application. I want to build an app to visualise various tree and graph data structure algorithms.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vrishank Gupta</dc:creator><pubDate>Fri, 06 Apr 2018 15:21:46 -0000</pubDate><guid>https://sourceforge.net3ea99c7e3da87b8a8d419ee3fcef1ac9cded64a2</guid></item><item><title>Flare CircleLayout Data Visualization</title><link>https://sourceforge.net/p/prefuse/discussion/757572/thread/8228bdd1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;hey,&lt;br/&gt;
i want create a data visualisation for CircleLayout from data like :&lt;br/&gt;
[&lt;/p&gt;
&lt;p&gt;{"name":"info","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"math","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"physique","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"science","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"francais","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"anglais","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"arabe","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;br/&gt;
{"name":"philosophie","publication":&lt;span&gt;["pub1","pub2","pub3","pub4"]&lt;/span&gt;}&lt;/p&gt;
&lt;p&gt;]&lt;br/&gt;
specificaly i need a function like databuild of depandencyGrah of flare&lt;br/&gt;
thanks&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">elhajjam amir</dc:creator><pubDate>Thu, 28 Jul 2016 22:41:20 -0000</pubDate><guid>https://sourceforge.neta9c89e4081697a899bfffd34b7fc959b5df4c0d4</guid></item><item><title>How to load multiple xml in Tree View demo class?</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/cf84f845/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Prefusians,&lt;br/&gt;
Im new in Java.Im using TreeView demo class. What i m looking for is, to be able to use two radio buttons, OR a browse button and load an xml of my choice and the TreeView demo load the data as per my xml. Ofcourse, the structure of both xml would be the same, but only data would be different.&lt;br/&gt;
Possible? plz plz help me with this.&lt;br/&gt;
Thanks.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">maliha z</dc:creator><pubDate>Sat, 10 Oct 2015 15:45:51 -0000</pubDate><guid>https://sourceforge.net52494ab34d3c0e3a8d18c5e7ed88b5c90594f89f</guid></item><item><title>How to change Font color of each node in treeview?</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/0d01fb7f/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;No, actually its not about tree depth, i just used it as example, i was actually regerring to TreeView class that im using but i have modified its .xml as per my needs. I just want to color the Author, Co-Advisor and Date of issue to appear in Blue, Green and maroon color respectively in each child node. Hope im clear this time...plz suggest any ideas for that also. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">maliha z</dc:creator><pubDate>Thu, 17 Sep 2015 17:25:35 -0000</pubDate><guid>https://sourceforge.net8298dc573eee17459800e5546be5aee84af3b297</guid></item><item><title>How to change Font color of each node in treeview?</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/0d01fb7f/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;the tree depth is already visualized through the layout, so (maybe) no need to visualize the tree depth by a second visual aspect?&lt;br/&gt;
Usually color for different things is used to visualize different aspects (male/female nodes, year of date, anything, ...) that does not&lt;/p&gt;
&lt;p&gt;If you want to go your way, you need a ColorAction or a DataColorAction. Basically those actions assign a color value to the corresponding color field (e.g. the TextColor field). Ok, and your renderer needs to consider this, but I guess default font/text renderer will do.&lt;/p&gt;
&lt;p&gt;Search the source code of the demos/prefuse/demos classes if any of them uses ColorAction or DataColorAction.&lt;/p&gt;
&lt;p&gt;If you have problems getting your tree depth as input, then simply write your own ColorAction. That's no big deal and probably explained on this forum.&lt;/p&gt;
&lt;p&gt;hope that helps,&lt;br/&gt;
Björn&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Kruse</dc:creator><pubDate>Wed, 16 Sep 2015 17:06:00 -0000</pubDate><guid>https://sourceforge.net4a7c223c3f8e3de6df9c1089ab70e32569dd8faa</guid></item><item><title>How to change Font color of each node in treeview?</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/0d01fb7f/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is it possible that in TreeView example, I may change the font color of the node at each level. Like if my tree is 6 levels deep, i use 6 different colors for nodes at 6 levels.&lt;/p&gt;
&lt;p&gt;Plz help or suggest something better to make my tree attractive.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">maliha z</dc:creator><pubDate>Wed, 16 Sep 2015 14:42:39 -0000</pubDate><guid>https://sourceforge.net7ab1d4d596d137ad439d30c9fbb6bc40bde4d228</guid></item><item><title>Help required for TreeMap class</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/faf576c9/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hey, Bjorn, thanks for your response. Yes DataMountain is what im looking at but it defines its images in a folder and also uses amazon.txt file to get the ids of the images, pass it to URL and navigate to the respective page on amazon site. But in my case im using xml file, and also NodeLinkTree layout, in which i have multiple nodes, out of which i want one of my nodes(URI) to be clickable, that i have done already. Now im trying to load an image in another node, on click of that image, i want it to launch browser and open the URL i specify in the code may be..&lt;br/&gt;
any suggestions for that please?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">maliha z</dc:creator><pubDate>Mon, 14 Sep 2015 14:17:18 -0000</pubDate><guid>https://sourceforge.net5100bf3db13cbd1d3946f8de9ab67a84d5f4d72c</guid></item><item><title>Help required for TreeMap class</title><link>https://sourceforge.net/p/prefuse/discussion/343013/thread/faf576c9/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I haven't been reading this forum for years, but take a look at DataMountain Demo &lt;a href="http://prefuse.org/gallery/datamountain/" rel="nofollow"&gt;http://prefuse.org/gallery/datamountain/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It uses images and is clickable, if I remember right.&lt;/p&gt;
&lt;p&gt;Maybe, in the itemClicked method, just get the field value from your node/item and check if its type/value is what you want to be clickable. If not, just exit without doing anything.&lt;br/&gt;
Looks like you want nodes with name==URI to be clickable?&lt;/p&gt;
&lt;p&gt;Good luck,&lt;br/&gt;
Björn&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Kruse</dc:creator><pubDate>Sun, 13 Sep 2015 19:27:54 -0000</pubDate><guid>https://sourceforge.net0a7334472bbdc87ffb4e731fac5e726817d430ec</guid></item></channel></rss>