Giter VIP home page Giter VIP logo

prefuse / prefuse Goto Github PK

View Code? Open in Web Editor NEW
565.0 565.0 200.0 4.14 MB

Prefuse is a set of software tools for creating rich interactive data visualizations in the Java programming language. Prefuse supports a rich set of features for data modeling, visualization, and interaction. It provides optimized data structures for tables, graphs, and trees, a host of layout and visual encoding techniques, and support for animation, dynamic queries, integrated search, and database connectivity.

Home Page: http://kneecap.ist.berkeley.edu/

License: Other

Shell 0.02% Java 99.27% Batchfile 0.02% HTML 0.68%

prefuse's Introduction

prefuse

beta release - initial release february 2006, current release 2007.10.20

This repository was initially created from the release available at http://downloads.sourceforge.net/prefuse/prefuse-beta-20071021.zip

INTRO

prefuse is a Java-based toolkit for building interactive information visualization applications. Prefuse supports a rich set of features for data modeling, visualization, and interaction. It provides optimized data structures for tables, graphs, and trees, a host of layout and visual encoding techniques, and support for animation, dynamic queries, integrated search, and database connectivity. Prefuse is written in Java, using the Java 2D graphics library, and is easily integrated into Java Swing applications or web applets.

Prefuse is a creation of the UC Berkeley Visualization Lab http://vis.berkeley.edu/. Prefuse is licensed under the terms of a BSD license, and can be freely used for both commercial and non-commercial purposes.

STRUCTURE

The toolkit distribution uses the following organization:

+ prefuse
|-- build  Directory where compiled classes and jar files are placed
|-- data   Various example data files used by the demo applications
|-- demos  Demo applications and applets showing the toolkit in use
|-- doc    Documentation. The Javadoc API files reside here once generated
|-- lib    Third-party libraries useful with prefuse and their licenses
|-- src    The source code for the prefuse toolkit
|-- test   JUnit tests for the toolkit (still a bit sparse at the moment)

REQUIREMENTS

prefuse is written in Java 1.4, using the Java2D graphics library. To compile the prefuse code, and to build and run prefuse applications, you'll need a copy of the Java Development Kit (JDK) for version 1.4.2 or greater. You can download the most recent version of the JDK from http://java.sun.com/j2se/1.5.0/download.html.

We also recommended (though by no means is it required) that you use an Integrated Development Environment such as Eclipse (http://eclipse.org). Especially if you are a Java novice, it will likely make your life much easier.

BUILDING

prefuse uses the Ant system from the Apache Group to compile the files. Ant is bundled with this distribution, and can be run using the build.bat script (in Windows) or the build.sh script (in UNIX). For example, running build.bat usage will provide a list of available commands, build.bat all will compile the toolkit and demos into jar files, running build.bat api will generate the html API documentation for the toolkit in the doc directory.

Alternatively, you can use the Eclipse integrated development environment (available for free at http://ww.eclipse.org) to load the source files, then Eclipse will compile the software for you. Within Eclipse, right-click the background of the "Package Explorer" panel and choose "Import". Then select "Existing Projects into Workspace". In resulting dialog, click the radio button for "Select archive file" and browse for the prefuse distribution zip file. The "prefuse" project should then appear in the area below. Now just click the "Finish" button to import the project and build it. Once prefuse has been loaded as a project within Eclipse, you can then run various demos directly from within Eclipse by right-clicking the class file for a demo (e.g., demos/prefuse.demos.GraphView.java) and selecting "Run >> Java Application" from the menu.

MORE

Additional information and preliminary documentation, a gallery of featured prefuse applications, and more, were available at the prefuse website, which is no longer available since 2018. A snapshot can be found at https://web.archive.org/web/20181215222711/http://prefuse.org/.

SourceForge hosts a help forum: https://sourceforge.net/p/prefuse/discussion/343013/

StackOverflow questions: https://stackoverflow.com/questions/tagged/prefuse

Academic publication by the initial developers: http://doi.acm.org/10.1145/1054972.1055031

prefuse's People

Contributors

alex-rind avatar boessu avatar corvojow avatar dahie avatar islamvis avatar jheer avatar john-guerra avatar kjkrum avatar krzysiekfonal avatar mebigfatguy avatar nsadras avatar zillode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prefuse's Issues

Should the Display#InputEventCapturer honor Event.isConsumed()?

As the title says.

Currently, in all of the fireXXXX(...) methods, it is not checked whether or not an event has been consumed in the chain of ControlAdapters.

I wrote a ControlAdapter to change how left-clicking works, depending on a keyboard modifier. I wanted to consume the appropriate MouseEvent so it didn't propagate to all other listeners (like the PanControl).

Now I understand I can either add my own pan functionality to my custom adapter, or add/remove adapters on demand, but those options seem a bit hacky and overly-cumbersome.

Include original project history in Git repo?

It might be nice for historical reference to include the commit history of the original project from the old SourceForge CVS repo, from before the community handoff and development started on Git. Would you be interested in pulling that into the GitHub repo?

Here's an example of what it could look like: https://github.com/apjanke/prefuse-history. This repo was created by using cvs2svn to export the old project's CVS history, and then prepending that to the history of the current https://github.com/prefuse/Prefuse repo.

User Manual?

Hello,
Are the sections of the User Manual "Under Construction" ever going to be updated? There are still many people trying to learn how to use this.

Thank you!

TreeView can't display nodes with "<" character

Taking a working treeML file and changing an attribute value to contain "<" causes the following error:

Dec 15, 2012 7:50:23 PM prefuse.action.ActionList run
WARNING: Invalid row index: -1
java.lang.IllegalArgumentException: Invalid row index: -1
at prefuse.data.tuple.TupleManager.getTuple(TupleManager.java:90)
at prefuse.data.Tree.getRoot(Tree.java:286)
at prefuse.action.layout.graph.TreeLayout.getLayoutRoot(TreeLayout.java:67)
at prefuse.action.layout.graph.NodeLinkTreeLayout.run(NodeLinkTreeLayout.java:249)
at prefuse.action.ActionList.run(ActionList.java:79)
at prefuse.action.Action.run(Action.java:122)
at prefuse.activity.Activity.runActivity(Activity.java:152)
at prefuse.activity.ActivityManager.run(ActivityManager.java:365)

I did some searching around and this appears to be illegal in XML, but using the XML replacement "&#60;" doesn't seem to work, here.

query.trim() doesn't modify the String Object in KeywordSearchTupleSet.java

Return value of String.trim() ignored in prefuse.data.search.KeywordSearchTupleSet.search(String)
The return value of this method should be checked. The cause of this bug is to invoke a method on an immutable object, thinking that it updates the object.
But since Strings are immutable, the trim() function returns a new String value, which is being ignored here. The code should be corrected to: query = query.trim();

m_predicate in Display.java causes a memory leak when overriding Display

When trying to clean up my memory when using the a class that overrides Display (we use prefuse in an MDI environment), I was seeing that my classes were still held in memory, due to m_predicate in Display.java holding on to my class' reference.

To fix it, I added a method in AbstractExpression.java: removeAllExpressionListeners() that just clears m_listeners, and then call that method when I am cleaning up my Display.

ForceDirectedLayout - edge length

Hi,

I am using the class ForceDirectedLayout in order to layout the positions of graph elements,
but I would like to be able to define the length of each edge. I have redefined getSpringLength in order to reach my goal, I have also use explicitly addSpring from ForceSimulator, but nothing changes. Could you please tell me what is missing me?

Best regards,
Marta Nascimento

Mistyping in TypeLib.getNumericType

May be
if (c1 == float.class || c1 == float.class)
return float.class;
must be
if (c1 == float.class || c2 == float.class)
return float.class;

Cleaning up warnings

There are 37 pieces of dead code, 4 unused local vars, and 59 Serializable classes with no serialVersionUID.

All but one of the dead code warnings is in the generated prefuse.data.expression.parser.ExpressionParser. They take the form of 'break' statements after 'return' statements or 'throw' statements after 'return' statements preceded by useless 'if(true)' conditions. I know very little about JavaCC, so I have no idea why it generated all this dead and useless code. I fixed it by hand in this commit: https://github.com/kjkrum/Prefuse/commit/59bb669d695f12c65930c08517bec9564a657a1e

I also added a default serialVersionUID to all Serializable classes: https://github.com/kjkrum/Prefuse/commit/64f2c97fac060af6d81fb41fcf2119791b1d1363

I was more cautious about fixing the unused local vars and the one remaining piece of dead code. I didn't want to just go in and remove them without understanding the author's intent, because the dead code may point to a bug. Only one of the unused local vars seemed to have an obvious intent: https://github.com/kjkrum/Prefuse/commit/b740787e59b0d88d01eab52586e4d8aa8b365b4a

I'd appreciate some help understanding the intention behind the remaining four.

prefuse.data.util.BreadthFirstIterator line 168: The increment part of the 'for' is dead code because the method always returns on the first iteration of loop.

prefuse.data.tree.Tree line 587: 'ncount' is incremented but never used.

prefuse.action.layout.StackedAreaChart line 261: 'sum' is incremented but never used.

prefuse.action.layout.graph.SquarifiedTreeMapLayout line 135: 'leafCount' is incremented but never used.

Mavenize the project

This is a request to rearrange the project so that it can be built with Maven, maybe separating it in modules.

Various memory leaks

There are many threads about memory leaks on the old SourceForge Prefuse forums. I've tracked down a few of them that were affecting my own project:

TreeLayout and its subclasses retain references to NodeItems as m_root
RadialTreeLayout retains a reference to a NodeItem as m_prevRoot
GraphDistanceFilter retains references to NodeItems in m_bfs

I've added reset() methods to clear these references. I'm sure the same thing needs to be done to many other classes. Git is an annoyance for me (I rarely use it and have to re-learn it every time I do) so until I get around to pushing my changes and creating a pull request, be aware of these potential memory leaks. I'd be perfectly happy if someone else pushed the changes and took credit for the fix.

Side effects in the setBounds() method of the EdgeRenderer.java class

Concerning the last little block of code in the setBounds(VisualItem item) method in the EdgeRenderer.java class, I added one print statement in the middle that checks to see if m_curArrow is null. Here's my version:

if ( m_curArrow != null ) {
Rectangle2D bbox = (Rectangle2D)item.get(VisualItem.BOUNDS);
if ( m_curArrow == null )
{ System.out.println(โ€œ But now m_curArrow is null.โ€); }
Rectangle2D.union(bbox, m_curArrow.getBounds2D(), bbox);
}

It seems impossible, but I have some data sets that cause the print statement to get executed. My best guess is that the VisualItem.BOUNDS constant is no longer maintained, and passing Visual.BOUNDS to get() is causing some strange side efects.

I would have proposed a fix to this problem, but to be honest, I don't quite understand what this block is supposed to do. It declares bbox, updates it, and then seems to do nothing with it.

For my own purposes, I've simply added a check to see if m_curArrow is null in my own copy of the code. But I thought that I should open a GitHub issue so that the defect does not get forgotten.

TreeView throws IllegalArgumentException when presenting an empty graph

When you try to present an empty tree view, prefuse complains:

Jul 17, 2013 2:16:03 PM prefuse.action.ActionList run
WARNING: Invalid row index: 0
java.lang.IllegalArgumentException: Invalid row index: 0
at prefuse.data.tuple.TupleManager.getTuple(Unknown Source)
at prefuse.data.tuple.TupleManager$TupleManagerIterator.next(Unknown Source)
at prefuse.data.Graph.getSpanningTree(Unknown Source)
at prefuse.action.filter.FisheyeTreeFilter.run(Unknown Source)
at prefuse.action.ActionList.run(Unknown Source)
at prefuse.action.Action.run(Unknown Source)
at prefuse.activity.Activity.runActivity(Unknown Source)
at prefuse.activity.ActivityManager.run(Unknown Source)

To reproduce modify Prefuse/demos/prefuse/demos/TreeView#setUpData(), comment all lines after the creation of the graph, and start it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.