tags:

views:

183

answers:

1

Hi,

I am new to gwt connector. I was trying a simple example, everything works fine except that the connector line is not visible. I can see the green points but no line between them. Below is the code:

package com.example.connector.client;

import pl.tecna.gwt.connectors.client.Connector;
import pl.tecna.gwt.connectors.client.Diagram;
import pl.tecna.gwt.connectors.client.Shape;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Example implements EntryPoint {
   public void onModuleLoad() {

           AbsolutePanel ap = new AbsolutePanel();
           ap.setSize("600px", "600px");
           RootPanel.get().add(ap, 10, 10);

           Diagram diagram = new Diagram(ap);
           Label l = new Label("Example");
           ap.add(l);

           Connector c = new Connector(50, 80, 100, 100);
           c.showOnDiagram(diagram);

           Label l1 = new Label("Label for VP");
           TextBox t1 = new TextBox();
           t1.setText("Hello");
           VerticalPanel vp = new VerticalPanel();
           vp.add(t1);
           vp.add(l1);
           ap.add(vp);

           Shape shaperforVP = new Shape(vp);
           shaperforVP.showOnDiagram(diagram);

   }
}

can anyone please tell me what is going wrong.

Thank you.

A: 

Hi sony,

I created a new gwt project in Eclipse and copied your code and it appears to work. I can see 2 green EndPoints and the connector appears as well.

I'm using the following versions in my environment:

And it looks good in hosted mode, firefox 3.5.5, and IE 7.

Hope this helps, - Dave

Dave Paroulek
Thank you. I had gwt-connector 1.7.0, i changed it to 1.7.1 and it is working.
sprasad12