GraphViz : Interactive swing ui? - java

Hi : Is there a way to convert a graphviz file into a GUI (i.e. using swing) ? I want to be able to click on nodes, and plugin popups or actionlisteners associated with each node in a graphviz interface.
Im sure there exist some java API's for dealing with graphviz data, so I may simply convert a graphviz object into a jgraphT graph, and visualize that way.... But Im keeping my hopes up that somebody has had this idea before and, maybe, there exists a graphviz-ui builder, somewhere out there.
I wouldnt mind if such a ui existed in another language (i.e. python) ... But java would be my preference.
A Related Question
Certainly, there are other people thinking along these lines : Interactive Graphviz graphs in a web application
However, I want to use graphviz to debug a large data flow, which we have mapped visually library, wherein I want to click a node, and then read some files from the local disc based on that click . Thus, a simple javascript gui to graphviz might not be a valid solution for me.

I have used ZGRViewer, which is open source java.
It lets you navigate the graphviz generated svg, and might be a good starting point for your project.
It's not a UI builder, or API as the details of your question ask, but it is a nice graphviz interactive ui, and you might be able to get some hooks in on the existing click command.

Related

How to automate the manipulation of a Java GUI program by control hierarchy (from C#)?

I'm new to the world of C# automation so apologies if this is obvious. My colleagues and I work frequently within an app written in Java, and I'm looking to automate some of the tasks. However, I can't seem to identify any of the elements (various menus, textboxes, etc.) within the Java windows using the tools I'm aware of (Inspect and Spy++). Nothing within the main "window" of the app shows up in Inspect (just the title bar and its' children).
I've gotten the automation working by using P/Invoke SendInput commands to click on the various parts of the window I need to click on (based on x/y coordinates) and enter text as if it's coming from the keyboard. However, this seems a bit ... fiddly. I'd feel better using this if I could formalize element names instead of just sending mouseclick instructions via code, is there a way to do this? For example with something like the Windows.Automation library when I don't have the element IDs?
TestStack.White framework written in C# should help you. It's based on UI Automation API and should see any lightweight controls like WPF ones.

Control other applications using Java?

How can I control other applications using Java ?
I'm using the Mary Speech Synthesizer(Open source, Java). It can synthesize speech well , but it requires the text to be in a textbox in the application window itself and then a button to be clicked . For this project of mine
the text that needs to be realized is gonna be inbound from another java application . I need to know how I can place the text in the textbox and send a click to one of the buttons in the application .
I'm hoping to figure out a way to synthesize speech from a buffer later on but till then this seems like it's a way to get things working . Also , I'm pretty sure I'll be able to find other applications for this later on and this seems like a very interesting problem ..
Get the other application's API and call its methods accordingly.
If an application does not offer an API to interact with it, there is no simple solution to make it.
However, since the application is open source you can verify what type of licensing it has, and include a part of its source code in your Java application and call it properly.
I think your best option is to find a library that does the text synthesizing. Since controlling another java application required that java application to provide the necessary API for you to access it. As #Edmondo1984 told in his answer you can include the part of the code from the open source application(After checking the licence).

Seek a Java advanced tree component (include Windowless Richedit Control function)

I love BooguNote very much (it's a Sharp tool for collecting and organizing information scraps) But what a pity it just run under windows currently.
I tried to build a Java version for BooguNote so I can run it under linux (first step: I want to just make a simple BooguViewer ) since I'm not very familiar with so huge Java libraries, so I ask for help who know the suitable Java tree component in this case.
My requirement is this:
it's not an usual tree component, as you can check from the BooguNote's screenshot as below:
http://boogu.me/en.jpg
Usual tree is used as an outline, but in BooguNote, tree node was used as a content container at the same time - you can even save a huge text in it! (I heard the author said in the forum before he used "Windowless Richedit Control" technology).
Any advices are welcome, Thanks in advance.
This Oracle tutorial tells you how to create graphical user interfaces (GUIs) for applications and applets, using the Java Swing components.
Start with the Using Swing Components tutorial. Go through the following top-level lessons:
Using Top-Level Containers
The JComponent Class
Using Text Components
Go through the following component lessons:
How to Make Frames (Main Windows)
How to Use Panels
How to Use Trees
The Swing components that you want to use to make a viewer are JFrame, JPanel, and JTree.

Making a Windows Taskbar Jump-List in Java

I know the following things, and was wondering if they can be combined to make Java use jump-lists in Windows:
Windows displays Jump-Lists for supporting programs when a taskbar icon is right-clicked
C++, C#, F#, and VB support this natively (as shown here)
Java can import native capabilities using the JNA (as shown here)
Anybody have experience they can lend to help me create a jump-list for a Java app?
The J7Goodies library won't work, as it no longer exists.
The word "natively" is overstating the case a bit. WPF provides jump list support. That's not the same as C# providing it. (For Windows Forms people there's the Code Pack which is a set of managed wrappers.) And MFC provides jump list support which is also not the same as C++ providing it. Anyway, there are two things going on here. One is adding files you opened recently to that jumplist, which under some circumstances you can get for free. The other is adding arbitrary files (typically starting point templates etc) to the jumplist.
To add a file to the recent/frequent list, you call SHAddToRecentDocs, though you may not have to if, for example, you use the Common File Dialog control to open files, and/or the user double-clicks files to launch your app and open them (you have the file type registered.) Lots of folks suggest calling it anyway to be on the safe side. To add any old thing to the jumplist see http://msdn.microsoft.com/en-us/library/dd378402(v=VS.85).aspx.
How to call those from Java, I forget, but I hope they get you started.
There is a Java library providing the new Windows 7 features for Java. It's called J7Goodies by Strix Code. You can create your own jump lists with it.

How can I integrate an external word processing application with a Java Swing app?

I need some genius advice on this one.
I have a Java Swing application that needs to launch a word processor in order to allow the user to complete some work, and then retrieve the output of that work and evaluate it later.
In my head I am thinking my application can look in the normal places for Open Office or Word executables to see if one of those programs is installed, and then create a process and block the Swing window until that process returns. Is this really the best way to go? Also, how can I pass data back and forth?
I looked into the Open office java bean already, but alas I do not think there is Mac/Linux support.
So, to sum up my question:
is creating a process for the word processor the best way to do this?
how can I pass info between my app and the word processor (more specifically, when they have finished creating their document, how can the Swing app get it)
Thanks,
Ben
Use the open office sdk, which is available for Linux. You might want to use open office in server mode.
You could integrate docx4all (Swing based docx word processor) into your app.

Categories