简体   繁体   中英

Prefuse Library: How to add <link> to a node built using prefuse library?

I am new to Prefuse library and Java. I did install eclipse,flash builder plugin for eclipse and compiled the code. I want to make some modifications to the existing sample. TreeView.java

In this sample we add only TEXT as a NODE. Can I add a link to web page so that when users click on a node, will direct to a web page.

Kindly let me know, If you can help me on this ?

Regards,

vismaran.

I've never done this before, but I think it can be done via controls and actions.

Three steps:

  1. Define an action/activity for opening external webpages; I would assume this class would extend the prefuse Activity class

  2. Add your new activity to an action list, and assign it a name

  3. Add a new FocusControl object to your visualization, and create it with the activity attached, so that when a vis element is in focus, this activity is trigger.

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM