Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [Zest] Graph not pretty
[Zest] Graph not pretty [message #246905] Mon, 19 January 2009 11:20 Go to next message
Joseph George Variam is currently offline Joseph George VariamFriend
Messages: 19
Registered: July 2009
Junior Member
Hi,
I’m using Zest to visualize a graph in our network-management software.
The graph is a network topology and the nodes in the graph are network
devices like switches and PCs.

This is what a graph looks like:
http://docs.google.com/Doc?id=df37tr6f_6hgv4h2dj

As you can see from the pic, its not very pretty and it has the
following issues:
1. Node Overlapping. I’ve tried using a composite
layout(radial+horizontal_shift) but then the graph looks horrible. Is
there any way to remove node overlapping?

2. The images in the nodes are transparent gifs but, they are displayed
in the node with a white background. I want the background color of the
images to take on whatever background color the node has. How would I do
this?


This is what the relevant code looks like:

Graph graph = new Graph(shell, SWT.NONE);

GraphNode a1 = new GraphNode(graph, SWT.NONE, "SMC 8624T",
ImageRegistry.getImage("switch"));
GraphNode a2 = new GraphNode(graph, SWT.NONE, "Access2",
ImageRegistry.getImage("switch"));
GraphNode a3 = new GraphNode(graph, SWT.NONE, "sphere-21.dxb.sphere.ae",
ImageRegistry.getImage("node"));
....

GraphConnection c1 = new GraphConnection(graph, SWT.NONE, a28, a59);
GraphConnection c2 = new GraphConnection(graph, SWT.NONE, a27, a54);
GraphConnection c3 = new GraphConnection(graph, SWT.NONE, a61, a26);
....

graph.setLayoutAlgorithm(new
RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
Re: [Zest] Graph not pretty [message #247293 is a reply to message #246905] Fri, 13 February 2009 16:50 Go to previous message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

Node overlap removal is something we looked at a long time ago. It turns
out this is very computationally expensive, and grows the graphs to
arbitrary sizes.

Have you tried a tree layout?

As for the transparency issue. I don't know how hard this would be. I
guess it would depend on how well SWT + Draw2D handle this. If you can
open a bug with some snippets that show how to implement transparency in
Draw2D, I can get them included.

cheers,
ian

Joseph George Variam wrote:
> Hi,
> I’m using Zest to visualize a graph in our network-management software.
> The graph is a network topology and the nodes in the graph are network
> devices like switches and PCs.
>
> This is what a graph looks like:
> http://docs.google.com/Doc?id=df37tr6f_6hgv4h2dj
>
> As you can see from the pic, its not very pretty and it has the
> following issues:
> 1. Node Overlapping. I’ve tried using a composite
> layout(radial+horizontal_shift) but then the graph looks horrible. Is
> there any way to remove node overlapping?
>
> 2. The images in the nodes are transparent gifs but, they are displayed
> in the node with a white background. I want the background color of the
> images to take on whatever background color the node has. How would I do
> this?
>
>
> This is what the relevant code looks like:
>
> Graph graph = new Graph(shell, SWT.NONE);
>
> GraphNode a1 = new GraphNode(graph, SWT.NONE, "SMC 8624T",
> ImageRegistry.getImage("switch"));
> GraphNode a2 = new GraphNode(graph, SWT.NONE, "Access2",
> ImageRegistry.getImage("switch"));
> GraphNode a3 = new GraphNode(graph, SWT.NONE, "sphere-21.dxb.sphere.ae",
> ImageRegistry.getImage("node"));
> ...
>
> GraphConnection c1 = new GraphConnection(graph, SWT.NONE, a28, a59);
> GraphConnection c2 = new GraphConnection(graph, SWT.NONE, a27, a54);
> GraphConnection c3 = new GraphConnection(graph, SWT.NONE, a61, a26);
> ...
>
> graph.setLayoutAlgorithm(new
> RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
Previous Topic:[Zest] Zest Layouts
Next Topic:Zest : custom Layout like network bus
Goto Forum:
  


Current Time: Tue Apr 23 08:44:02 GMT 2024

Powered by FUDForum. Page generated in 0.02868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top