Java UML editable component/lib - java

I have a task where we need to generate UML(or similar) from XML and will be able to edit text, property type and drag dependency row. But I can't find any Java lib or component wich will allow me to do such.
For example PlantText is a good lib but it does not allow to make edit.
If someone known such lib/compoment please share.
Thanks
EDIT:
Sorry, maybe I wasn't wrote clear. Actually, I need library which I can implement into my project, and after I will be able to generate UML from my project, then edit it and save into XML.

draw.io is very good site where you can create (not only) UML's and save them to XML file so in future you can edit it. The drawback is it is not automatic and must be drawn from scratch.

Related

How can we generate sequence diagram in IntelliJ IDEA from Java code which is editable?

I am currently using SequenceDiagram Plugin from https://plugins.jetbrains.com/plugin/8286?pr= to generate Sequence Diagrams.
But here the drawback is that I am not able to save them in a format like .uml or any other format so anyone can open this file and edit it.
It only allows to export the sequnce diagram as an image.
Is there any way to save the sequence diagrams generated so they can be edited later?
As the file https://github.com/Vanco/SequencePlugin/blob/master/src/org/intellij/sequencer/diagram/app/actions/ExportAction.java shows the plugin is able to export into images only. According to the licence you can modify the software if you keep in mind this part of the licence.
I think it is a good feature you suggested, it is not an easy job tho. If you plan to extend the feature try to contact with https://github.com/Vanco. I think it would be a handy thing for all of us!
Edit:
I posted it as a comment, but it is part of the answer:
Here is a github repo: https://github.com/sherif181/java-sequence-diagram-generator it is not a plugin but looks handy for your case. It will generate LaTex documents that could be edited.

Java: Simple Validation API Validation Strategy Change

This is in reference to the question posted at org.netbeans.validation.api.ui.ValidationGroup.add() - How to specify ValidationStrategy?
I am trying to do something similar. Please guide me on what needs to be changed and where. I went through the given links but couldn't find the relevant info.
P.S.: Asking in a separate question because I can't comment on the original one due to lack of reputation points.
Regards
Uday
I found out what was required.
Check out the code from their repository (https://svn.kenai.com/svn/simplevalidation~src) and open ValidationAPI as a project in Netbeans (or whatever IDE you're using).
To change the default validation strategy you'll need to make the changes in ValidationGroup and SwingValidationGroup classes under org.netbeans.validation.api.ui and org.netbeans.validation.api.ui.swing respectively.
In these classes find ValidationStrategy.DEFAULT and replace it with the strategy you want (INPUT_VERIFIER, ON_FOCUS_LOSS, ON_CHANGE_OR_ACTION).
Build the project to generate a new jar and incorporate that jar in your own project.
That's it.

Developing an Eclipse Content Assist plugin

I am trying to extend the default behaviour of content assist for XML files in Eclipse (Helios or lower). I need to add some predefined list items in an XML file when a user types a particular string and presses Ctrl+Space.
I tried to search over the internet and got some basic knowledge from Eclipse Help and from this blog. However, being a newbie in writing plugins, I'm unable to figure out some points, like
What should be the plugin template?
or where will the implementing class reside?
I am unable to find any tutorial which can explain it in a better way. Any suggestions in terms of useful links/tutorials would be a great help.
TIA.
The help you link to is for developing content assist in a new editor. If what you want is to add to the existing Eclipse WST XML editor then you have to use the org.eclipse.wst.sse.ui.completionProposal extension point defined by WST to add content proposals. There is an example here

Properties Table in Java

I need a table that displays properties and allows their values to be changed. Similar to the Netbeans properties windows for the GUI editor. Does anyone know of any existing classes or libraries. I'd hate to reinvent the wheel on this one.
Edit:
Something like this which allows separators into different groups, JCombos, and JButtons to all be used.
Thanks
I would recommend JTable, and a gridbag layout manager.
The table in NetBeans is PropertySheetView (or similar) and it is part of the NetBeans Platform (PropertySheetView JavaDoc). This class should also be usable in a standalone Swing application by including the necessary NetBeans modules as jar files in the classpath (Found this with a bit of googling).
JTable can be used to display a Grid with values and allow the user to edit the value from columns you enable to it.
You could leverage the JTable class; which should provide the base you need.
JIDE Soft has a number of components, some of them are OpenSource take a look at there to see if you fine the one you need.
For future reference
I'm successfully using l2prof-common's PropertySheetPanel. The documentation is not that great and the API is not that clean, but it works, and the view is nice
The official site is
http://www.l2fprod.com/common/
But the download link is broken; I compiled the propertysheet JAR myself but you can get the whole library from http://www.astrogrid.org/maven/l2fprod/jars/
The library doubles as a demo if you execute the jar and there's also the code in it
I found this other question useful Have com.l2fprod.common.propertysheet.PropertySheetPanel To Display Composited Class
I would recommend taking a look at the SwingX JXTreeTable. I have used it in an application to create a very similar view.
An example screenshot I found on the web (here) to illustrate this

Java Swing: Generating dynamic GUI forms from XML

I am writing this application in Java, where I have a JTree on the left of the JFrame, and the item selected in the JTree determines what appears on the right. This is similar to Edit --> Preferences in Thunderbird, and several other applications' preferences.
Anyhow the main difference is that in my app the stuff on the right is dynamic, and needs to be generated at run time using input from a file.
What I am after is various ways in which this can be accomplished, code snippets or existing frameworks / libraries if they exist.
The input file needs to be something higher level than the sort of XML generated during Serialization. No output capability is required.
Thanks
The JEasy Framework looks to do exactly what you're asking for.
But here's a whole list of similar projects: http://java-source.net/open-source/xml-user-interface-toolkits
There's a short description for each one and a link to their project page. You'll want to look at a handful of the ones that sound good to you, and then try one or two for yourself.
As of now i think one of the most actively used is Swixml. better support compared to JEasy.
have been using it for some while now, and is very easy to learn too
Perhaps it - http://www.soyatec.com/eface/ - XAML/WPF for Java.

Categories

Resources