简体   繁体   English

Prefuse Library:如何添加 <link> 使用预熔库构建的节点?

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

I am new to Prefuse library and Java. 我是Prefuse库和Java的新手。 I did install eclipse,flash builder plugin for eclipse and compiled the code. 我确实安装了eclipse,用于Eclipse的Flash Builder插件并编译了代码。 I want to make some modifications to the existing sample. 我想对现有示例进行一些修改。 TreeView.java TreeView.java

In this sample we add only TEXT as a NODE. 在此示例中,我们仅添加TEXT作为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 我假设该类将扩展prefuse Activity类

  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. 将一个新的FocusControl对象添加到您的可视化文件中,并在附加了活动的情况下进行创建,以便当vis元素成为焦点时,将触发该活动。

I hope this helps. 我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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