qasta / gwt-diagrams

Automatically exported from code.google.com/p/gwt-diagrams
0 stars 0 forks source link

gwt-diagrams with smartGwt? #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. gwt-diagram with smartGwt
2.   (attached the onModule code)
3.

What is the expected output? What do you see instead?
A beautiful connection drawn between two smartGwt labels.

What version of the product are you using? On what operating system?
xp
0.2-RC00
smartGwt 1.0b1

Please provide any additional information below.
I tried and found not working.  Went through gwt-diagram source code.  This 
time replaced gwt Panel with smartGwt Canvas.  That didnt help either.

Should I change all usage like 
    setElement(DOM.createDiv());
    addStyleName("gwt-diagrams-connection");
into smartGwt compatible?

Before I try anymore, want to look for directions.
* Is it feasible, easy to adjust a small portion of gwt-diagrams source 
code and use it with smartGwt?  If yes, how?

Thanks

Original issue reported on code.google.com by jeya.bal...@gmail.com on 24 Feb 2009 at 10:43

Attachments:

GoogleCodeExporter commented 9 years ago
I was able to get a working model after changing some of your files.  Once the 
code 
stabilize, I will upload the jar here.

Thanks for this wonderful piece of tool.

Original comment by jeya.bal...@gmail.com on 26 Feb 2009 at 8:38

GoogleCodeExporter commented 9 years ago
Hi jeya.balaji,

Can u show me the code how to draw the connection using gwt-diagrams with 
smartgwt?

Thanks you,

Original comment by gua...@gmail.com on 20 Nov 2009 at 9:36

GoogleCodeExporter commented 9 years ago
Sorry, forgot to place it before.  uploading the jar with the src.  will go 
thru the 
calling code and paste relevant info.

Original comment by jeya.bal...@gmail.com on 20 Nov 2009 at 2:52

Attachments:

GoogleCodeExporter commented 9 years ago
I got few lines are code given here.  They are neither continuous nor related.
Let me know if you have questions.

Connector connector = CanvasConnector.wrap(task.getLabel());
connector.update();
....

Connector task1Connector = CanvasConnector.wrap(parent);
        Connector task2Connector = CanvasConnector.wrap(child);

        // connected already
        if(null != 
RectilinearTwoEndedConnection.getRectilinearTwoEndedConnection(task1Connector, 
task2Connector))
        {
            if(task2Connector != null)
            {   
                task2Connector.update();
            }
            Log.info("Cannot connect again");
            return false;
        }
Connection  connection0 = new RectilinearTwoEndedConnection(task1Connector, 
task2Connector);
connection0.appendTo(topoCanvas);
...

public static void disconnect(Canvas parent, Canvas child) {
        Connector task1Connector = CanvasConnector.wrap(parent);
        Connector task2Connector = CanvasConnector.wrap(child);
        Connection  connection0 =  
RectilinearTwoEndedConnection.getRectilinearTwoEndedConnection(task1Connector, 
task2Connector);

        if(connection0 != null)
            connection0.remove();

RectilinearTwoEndedConnection.delinkRectilinearTwoEndedConnection(task1Connector
, 
task2Connector);
    }

Original comment by jeya.bal...@gmail.com on 20 Nov 2009 at 3:36

GoogleCodeExporter commented 9 years ago
Hi jeya.balaji,

thanks for your JAR file. I still fail to draw the connection. I am very new in 
GWT, 
can you show me a very simple program that able to draw a connection within 2 
smartGwt 
label? thank you in advanced

Original comment by gua...@gmail.com on 23 Nov 2009 at 2:07

GoogleCodeExporter commented 9 years ago
Hi jeya.balaji,

I am able to draw the line within 2 smartGwt label.

But when I dray the label the line not able to redraw. Any advise?

Original comment by gua...@gmail.com on 23 Nov 2009 at 3:50

GoogleCodeExporter commented 9 years ago
I vaguely remember that the lines did not move along with the label, but at the 
end of 
the drag the lines get adjusted to the new position. 

Is it happening for you?  If you want the line to adjust while dragging, you 
might have 
to change the code; however I tried that before it was not fast enough.  Guess 
the 
logic and the code we are using is not capable of handling that case.

Original comment by jeya.bal...@gmail.com on 23 Nov 2009 at 6:22

GoogleCodeExporter commented 9 years ago
Here is my testing code... Maybe you can help me point out my mistake.

Thanks

Original comment by gua...@gmail.com on 23 Nov 2009 at 10:08

Attachments:

GoogleCodeExporter commented 9 years ago
Hi jeya.balaji,

One more question, your smartgwt-diagrams.jar is based on which versin of 
gwt-daigrams?

Original comment by gua...@gmail.com on 24 Nov 2009 at 3:32

GoogleCodeExporter commented 9 years ago
gwt-diagrams-0.2-RC00

Yet to go thru your code.  Will go do it in the weekend.

Original comment by jeya.bal...@gmail.com on 24 Nov 2009 at 3:37

GoogleCodeExporter commented 9 years ago
Thanks for your reply!!

Just for your information.. there is another gwt-diagrams2 which is more latest 
source 
code http://code.google.com/p/gwt-diagrams2/

Original comment by gua...@gmail.com on 24 Nov 2009 at 3:48

GoogleCodeExporter commented 9 years ago
Cool API! Thanks a lot. Got the rectilinear Connection working immediately. 
Added a DropHandler to update the Connection. Works perfectly.

Original comment by olivier....@gmail.com on 18 Nov 2011 at 10:37

GoogleCodeExporter commented 9 years ago
I have the connectors working, but they're not being redrawn immediately on 
dragging.  Has anyone got this to work with drag or drop events yet?  

Original comment by j...@pepinonline.com on 26 Jan 2012 at 1:30

GoogleCodeExporter commented 9 years ago
Figured it out.  Add MovedHandler to the items that are connected, and the lien 
is redrawn correctly on dragging.

Original comment by j...@pepinonline.com on 26 Jan 2012 at 6:20