Can I draw State-Transition diagrams in JSF2 Web App? - java

I'm looking for a way to draw state-transition diagrams in my JSF2 project.
I would like to be able to load state and transition data and transform them in a graph that can be displayed on my web page.
I haven't found a way to do that yet. Charts available with Primefaces or MyFaces projects (I'm using the 1st one) are dedicated to statistics. In addition, it's probably possible to do that in javascript but I didn't found any example of that in the Google's API's for example.
Any suggestion or help would be appreciated.
Thanks a lot.
Clément

I doubt there are components that display graphs using plain html, but you might look for a library that generates an image which you can display in your page. That library wouldn't necessarily be JSF specific though.
Edit: maybe JUNG might be of interest for you.
In addition PrimeFaces' dynaImage might help you with displaying the generated graph image.

Related

How to use CSS graph in java

Is there a way to implement good design graphs in java?
I come from web front end, and I'd like to create graphs with amazing style effect in java - Just like how I would do in javascript and CSS?
Something like this:
You can take a look to those libs:
JfreeChart
JavaFX
I can miss some others.
I built a month ago an J2EE app (with servlet and JSP page) and I had to deal with charts and honestly I dropped the idea of doing it in Java. The reason? The difficulty of finding a good API/lib and the poor documentation of these.
I personally chose to use AngularJS and my data are produced with a Java program (NOT telling you that's the best method).
My charts are made with Zingchart. I found it very powerful due to the fact that the charts can be made from JSON (easy to make in Java).
Hope I helped you.

View 3D STEP .stp CAD model in GWT based web application

I am trying to make a GWT based web application which will be able to show 3D model from PTC Creo's .stp (STEP file). I am programming in Eclipse.
I started with Parallax3D framework, and I am able to make simple objects. But I'm stuck with how to parse the .stp file and make objects from that.
Later I saw that there is plenty of other tools for 3D on Web. There are "gwt-g3d", "gwtgl", "gwto3d",....
I also found JSDAI API, which should be able to parse .stp files. With very limited examples I couldn't manage to do anything usefull.
I am lost with all those things. Which path should I take?
Has anyone done that before OR is there a simpler opensource solution for that?
Thank you.
You could use the NIST STEP File Analyzer (free but not open source) to convert the STEP file to VRML/X3D. Three.js based frameworks can then view the VRML/X3D. If you want a completely open source solution, you need something to transform the STEP file, which often contains NURBS trimming that three.js lacks, to a tesselated form. FreeCAD, pythonOCC, node-occ or the underlying OpenCasCade can transform STEP to a mesh form.

IE does not support SVG viewer via JSF Trinidad

When using <tr:chart> component from Trinidad lib there is problem using it in Explorer since it does not have built in support for SVG viewer.
Trinidad has hard coded url in case of error which open adobe page of SVG viewer.
The problem is that it link is not updated since there is no SVG installation in adobe.
We need to supply different link. how can we override this URL?
Is there any better solution ?
Adobe have decided to discontinue support for the SVG viewer on January 1, 2009.
Ever considered using Highcharts to generate graphs in your Trinidad project? We do and it works like a charm! It does not use SVG on older versions of Internet Explorer; see Highcharts compatibility documentation. Also, Highcharts has way more possibilities to generate graphs and add interactivity then <tr:chart>. Actually, <tr:chart> is kind of limited in its possibilities.
The downside is that you don't have a JSF component to work with. Creating a static graph will be easy, but you might want to write a few lines of code to pass your data to the Highcharts Javascript to get things a bit more interesting. Trinidad's ExtendedRenderKitService comes in handy there:
ExtendedRenderKitService service =
Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "alert('foo');");

Generating and visualising a decision tree

I wonder if anyone is able to help or advise with the following; I have to be able to take data from a data source and to be able to visualise that data as a decision trees on a web page all. This will be a single process which is seamless to an end user.
This will be done using JSPs and Java servlets but what concerns me are the underlying products. I'm thinking of passing the data to a Weka classifier and then doing something with the .dot file it creates, i.e. maybe feeding it to GraphViz or trying to use the Google Visualization API to present an interactive display.
But, can anyone tell me if this is a viable approach or suggest alternatives?
Thanks
Martin O'Shea.
I've had a lot of success creating data flow graphs with graphviz (I uploaded them with a script to a MoinMoin wiki and used the graphviz plugin). That plugin even allowed to have links in the graphs, so we could keep the individual graphs small.
For the UI we have added the JS stuff from http://www.mxgraph.com/ to display larger graphs to the user.
Your approach is viable however. GraphViz is a good tool.

Extracting text from a PDF using JBoss Richfaces

I am trying to write a web-app to manage references for my PhD thesis.
I used to manage this information inside a personal Confluence (fantastic tool! - http://www.atlassian.com/software/confluence/) instance however I'm fed-up with the opening of PDF's and cutting and pasting values into fields that I wish to record.
I have exposed a webservice that will return me images based on a PDF filename and a page number. The same webservice also exposes a method that will return the text inside of a provided rectangle (top left x-y coord, bottom right x-y coord).
I would like to be able to drag a rectangle over part of the PDF image and then call the webservice to give me the text (which I will then store on a EntityBean). I am looking at using the JBoss application stack (Application Server, Hibernate, Seam and Richfaces). Does anybody know how I could go about achieving this? I have seen the ability to draw custom images in other RIA toolkits (e.g. dojo), but I can't see a way of doing this inside of Richfaces.
Hopefully somebody out there could prove me wrong, or provide some idea about what I can do (as I am not a web developer - I'm mainly building this tool because the RIA frameworks available now have got me interested!)
I already have the code to extract the text, my problem is purely how can I get the user to draw a "selection rectangle" inside the web browser over the top of the image?
Many Thanks,
Aidos
Try using the RichFaces Paint 2D tag
It exposes the Graphics2D package to the user interface.
Track user drag events on the image using javascript, then post the co-ordrdinates to the backing bean to re-render the image with a drawn on selection box.
Have you considered Mendeley ? It will try to parse and extract bibliographic information from your pdfs.
you can do it with itext (http://www.lowagie.com/iText/)

Categories

Resources