Categories
- Food (2)
- Investing (11)
- Kids (3)
- Programming (61)
- Thoughts (55)
- Uncategorized (1)
Tags
action android Argentina bond book Book review code code generation complexity craft delek nadlan Discworld donate eclipse editor EMF framework funny GEF graph help internals Investing investing guidelines israel java JGraph JUNG management mauldin novel opm passion programming research review Science fiction software software development style tase terry pratchett tutorial UML visual programmingFeeds
Tag Archives: JUNG
Learning JUNG (3) – Changing the vertex’s shape
To change the way a vertex is rendered, you provide an implementation of the Renderer.Vertex interface. The interface has one function – paintVertex – where you can draw anything you like, like in the graphics of any JComponent. I changed my example, adding 3 nodes: a circle, a square and a rectangle, each one painted with it’s shape and in a different color. And the results are favorable: P.D: Yes, I know that the code is ugly, is not OO, has numbers instead of constants, etc… I have no good excuse.
Learning JUNG (2) – Adding labels
That was very easy. First I changed the VisualizationImageServer for a VisualizationViewer. The name of the variable was also changed from vs to vv. The new class is the one used in all the JUNG examples, therefore it is probably better (talk about programming by coincidence). After doing this, I added the following lines after the creation of the VisualizationViewer: Transformer is an apache commons collections library that simply defines a one-way transformation between objects of two types (why isn’t this part of the standard Java libraries???). After defining the Transformer, it is added to the visualization engine using the … Continue reading
Learning JUNG – Java Universal Network/Graph Framework
I’m searching for “user-friendly” java graph frameworks for an application that I’m developing for my studies. I stumbled upon JUNG. After 15 minutes searching and reading, I managed to create a directed graph and show it on screen. And this is the output graph: Next step: Try to show labels and try to change the vertex shapes.
