Draw tree diagram in gwt - gwt

I want to draw tree diagram in gwt with custom connector color . Is it possible using some jar in gwt. I want to show hierarchy with diffrent connector color.
Can somebody help me?

You can use google visualization libraries. The org chart might be useful in your case. This is a javascript library that's been adapted to GWT so don't worry if you find JS code in the documentation.
Take a look at the documentation and make sure that this is what you're looking for then download the visualization libraries for GWT from here.

I would say to look into a wrapper for Raphaël.
But currently the Raphaël website is down so I am not sure about the state of this product. Although in Github I see a commit from only 5 days ago.

Related

GWT Image Cropping

I'm building a website using GWT and would like to add Image Cropping capability so users can upload their profile image and then crop it as they need to. I'm looking for something similar to Jcrop but in GWT.
I found THIS and THIS code samples how to crop an image on the client side but there is no UI part where user can select part of their image that needs to be cropped.
There were also couple of similar questions on SO (for example and this GWT with Jcrop) but nobody gave an example of the selection part of the image that uses pure GWT.
If you have an idea how to do it please share and I'm sure other people will leverage from this in the future.
Here is the example of what I'm looking for:
I recommend that you take route #1. I've been working full time in GWT for awhile and spend a lot of time looking for libraries, and this is one that I just don't think exists yet.
Here are your options:
Wrap Jcrop using a JSNI interface.
Pros: You have to include JQuery and JCrop, which are small and robust
Cons: Learning how to build your first JSNI wrapper can be a pain
Build your own from GWT Drag and Drop
Pros: "Pure GWT"
Cons: You probably won't handle all the edge cases that JCrop has figured out over time, nor be as featureful.
Port JCrop to GQuery
Pros: JCrop is open source and only around ~1600 lines of code
Cons: It's ~1600 lines of code, which is likely to be much bigger when ported to Java
If you decide to do any of the above, please open source it! I'd be happy to contribute, and it looks like something that I could use in my GWT projects as well.
GWT Cropper is a widget that allows cropping an image.
https://code.google.com/p/gwt-cropper/
Edited in 2015: as long as Google Code is about to be closed, the project has been moved to GitHub. The new address is https://github.com/w32blaster/gwt-cropper

Draw trees with links between them

I'm developing a schema matching visualization tool. I have the problem that I have to draw trees and the links between them like this image:
However, the tool in the image uses Swing but I use JFace.
Is there any visualization toolkit that support this ?
I know this a bit post is old, but it keeps coming up when I search for a solution to connect two nodes in JFace TreeViewer. On JFace forum it was suggested to look at Nebula TreeMapper. Hope this helps someone.

How to design the header of a website in GWT without using CSS?

I need to make the header and logo (google Code and Stockwatcher) of the stockwatcher example http://code.google.com/webtoolkit/doc/1.6/tutorial/gettingstarted.html without using CSS or HTML, that is all the code should be in JAVA. Can someone tell me how to do it ?
You should be able to create Panels and place elements in them progmatatically without a problem. But if you add more details to your questions I am sure we can be more helpful.
Also, you are linking to an older version of GWT, you might be helped by using the most recent version:
http://code.google.com/webtoolkit/doc/latest/DevGuide.html
This is probably the section you are looking for:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html
But I would recommend using UiBinder where you can, instead of pure Java. It is easier and more flexible that way.
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html

Looking for an interactive pie chart to use with GWT (without extern communication)?

I'm looking for a stand-alone Pie Chart which I can use in a GWT application. The Chart should be interactive, so that I can react on user input (read mouse clicks on the chart).
I've already looked at Google Chart Tools with GWT Visualization. This is exactly what I want. A simple to use PieChart class with user interaction and a simple and comprehensive data input. Except that the data is transfered to Google for the rendering part. The data should not leave the client or our server.
Have you tried Fusion Charts? Here's the Pie Chart showcase. Its a Flash object hence you will need to use JSNI to embed the object into your widget or use a library like GWT2SWF to do it for you.
I have used Fusion Charts + GWT2SWF combination in one of my products, and would recommend it to anyone looking for a interactive flash charting tool (outside of google's toolset)
A colleague of mine found following library: GChart. Rather then using Flash we'll try to draw our own. Not sure how easy this will be.
You mentioned:
"The Data should not leave the server"
With Google visualization APIs (as opposed to the chart apis) the data remains on your server, only the code is downloaded from google.
However, if you meant that you shouldnt need access to google at all, then GCharts is the only remaining and a pretty good option.
Check out GWT-RCharts hosted on http://code.google.com/p/gwt-rcharts/ . It is stand alone i.e doesn't have external dependency like Visualization. The API works on SVG/VML specification so no plugin dependency. You may find it quite easy to install, implement and use. You can find the demo at http://gwt-rcharts.appspot.com/

Advice for building simple bar chart, but with custom styling

I have some data that is displayed in a bar chart, using Google's Visualization API. Was simple enough until designers redesigned it... Now it appears to be something that is beyond what Google can help me with.
Given the attached mockup (and note the finer details like reflection and gradients!)- how would you go about building it? Using some existing graphing libraries? Homebrew from the ground up?
Thanks for any advice.
If you need to adhere to the custom design requirements as depicted in the image above, I would build a charting application using a more generalized graphics library such as Rapheal.
While it doesn't provide a simple API for plugging data into a chart, it does provide the ability to build a chart with the following:
a variety of shapes (i.e. the bars)
gradients
embedded images (i.e. the background)
You can change the visual effect using CSS.
Ofcourse you can use chuckx recommendation of Rapheal which is a SVG based Javascript Library. It can accept JSON values so say if you have JSON from Google API you could feed in directly.
Option 2 : HTML Canvas. There are lot of HTML 5 canvas libraries like Kinect, fabric.js powerful javascript canvas libraries