Violet
The latest
version of Violet is on the SourceForge site.
Martin Dawson
has produced a Mac bundle of the classic
version.
Impatient? Try it out with Java Web Start.
Note: The Web Start version is functional and safe without requiring you to accept any certificate. However, there are a few limitations.
Once you are confident that you like Violet, you should download it and run it locally.
Violet is a UML editor with these benefits:
Violet is intended for students, teachers, and authors who need to produce simple UML diagrams quickly. It is not intended as an industrial strength tool. There are several capable high-end UML editors available, such as
Those are fine programs for serious users of UML. However students and casual users may not like them because they are too slow, too expensive, or too hard to learn. Mike Godfrey coined the slogan: Roses are rational, violets are GNU.
Here are some of the features that industrial-strength UML programs have and that Violet does not have
If you just want to draw simple UML diagrams without too much fuss, chances are you'll like Violet. If you have more serious needs, check out one of the other programs.
My book "Object-Oriented Design
& Patterns" (John Wiley & Sons, 2003) discusses the graph
editor framework that underlies Violet. One reason to keep the program
simple is to limit the size of the source code so that it won't overwhelm
students.
Note: Another simple UML program is UMLet.
java -jar
jarfilename.jar
Replace jarfilename with the actual
JAR file name, such as com.horstmann.violet-0.21.0 or
violet-0.16a. On some operating systems, you may be able to
double-click on the jar file instead. When the program starts, pick a diagram type from the File->New
menu. The following types are currently available:
Each diagram window has a diagram-specific toolbar at the top. The first tool button (with the four "grabbers") is the "Select" tool.
The other tool buttons let you add nodes and edges to the diagram. Mouse over each node and read the tool tips to see what they do.

You can also right-click or double-click on an empty part of the
diagram to get a popup menu with the tools.
A diagram is composed of nodes (for example, classes or objects)
and edges (for example, inheritance arrows or call arrows).
To add a node, first click on the matching button, then click anywhere on the diagram to add it.
To connect two nodes with an edge, first select an edge tool. Then click on the first node and hold down the left mouse button. Drag the mouse to the second node and release the mouse button. The edge is inserted between the two nodes.
(There is one exception: You insert a "note connector" simply by
dragging from a "note" node. An invisible point node is automatically
inserted at the position where you release the mouse button.)
You use the select tool (with the four "grabbers") whenever you want to
select an existing object (node or edge) There are three reasons why you
would want to do that:
When you edit the properties of a node or edge, a property popup appears. It lists the properties of the objects in a table. Each property has a name and a value.
For example, the Note node has a property whose name is "color" and
whose value is a color value. When you edit the value field, the value in
the diagram is instantly updated.
When you are done with a diagram, save it with the File->Save or
File->Save as menu option. You can give it any name you like, but I
recommend you use an extension .violet.
To include a diagram in a document, export to PNG or JPEG format with the File->Export Image option. Here is a sample:
Tip: If you use Violet in a classroom setting, you may want to
use the View->Zoom menu option. You can zoom in or out of the diagram.
Zooming only affects the diagram display, not the size of saved
images.
Tip: If you use Violet on a slow computer, hide the grid. The nodes still snap to the grid, but the drawing is faster.
Thanks to Avi Bercovich, Andrew Brandt, Lars Arne Brekken, Chandler Burgess, Jørgen Cederberg, Robert Colburn, Piyush Devnani, Jeremy Driver, Jay Dunning, Morten Elling, Cris Fuhrman, Igor Garcia, Mark George, Mike Godfrey, Daniel Guerrero, Stefan Gründel, Wee Jin Goh, Laurent Hayoun, Graham King , Peter Kehl, Sebastian Kurt, Raymund J. Lin, Kevin McConnell, Matijs Moest, Tri Nguyen, Evelyn Obaid, Norbert Oertel, Johannes Päivinen, Bill Pine, Bruce Raggett, Zack Rubinstein, Grant Talarico, Jordan Thompson, Simon Tokumine, Jesper Trägårdh, Trygve Utstumo, Glenn Vanmarcke, Sam Watkins, Martin Wehner, Raphael Wimmer, Ed Zaron and (your name might go here) for their help, bug fixes, suggestions for improvement, and code submissions.
Newer versions are on the SourceForge site.
<applet width="800"
height="600" code="com/horstmann/violet/UMLEditor.class"
archive="violet-version.jar">
<param name="diagram"
value="myfile.violet">
</applet>
It's the Very Intuitive Object Layout Editing Tool. Also, various violets are the official state flowers of Rhode Island , New Jersey , Wisconsin and Illinois.
The Java library makes it easy to write attractive and highly graphical programs that run on multiple platforms. I wrote the first version of Violet in about 10 days.
Often, a diagram looks better when you distribute a class or object name on multiple lines, such as
ArrayIndex
OutOfBounds
Exception
It is difficult for a program to make an aesthetic judgment, so Violet leaves you in control.
Indeed you do, and what a drudgery it is. Select the "Add method" command. Type method name into text field. Type return type into another text field. Click on "public" radio button. Select the "Add parameter" command. Type parameter name into text field. Type parameter type into another text field. Select the "Add parameter" command again...
In Violet, you just type
+foo(x:int, y:int):int
Or, if you prefer
foo()
Of course, professional UML tools build up a model of your design, so
they need that information. Violet just produces a graph...
When you insert a node connector, an invisible end point is automatically inserted. You can select it by clicking on the end point of the node line. Then drag it anywhere you like.
Drag a line inside the connector, moving it by a moderate amount. The self-connection will be added. If you don't move the mouse enough, then the connector won't be added. That way, an accidental mouse click won't add unwanted connections.
HV = Horizontal, then Vertical. HVH = Horizontal, Vertical, then Horizontal. You may want to vary these if you have too many arrows terminating at one node.
Use the HTML <b> , <i> , or <u> tags in the text.
Use an HTML tag such as <font size="+1"> or <font color="red">
Use the HTML entity ► in the label text.
Add the HTML tag <br> .
This can be a problem with large images. The solution is to use the -Xm option to increase the maximum heap size. For example,
java -Xmx256m -jar /home/cay/web/com/violet/violet-0.16a.jar.
This particular invocation gives the Java virtual machine 256MB of heap space, four times its default of 64MB.
It's not standard UML, but I find these diagrams very handy for showing object references in Java. Here is an example:

Violet uses the "long term bean persistence" feature of JDK 1.4. The file format happens to be XML, but it is not very suitable for interchange of information with other programs.
Well, if you define "free enterprise" as "everyone who uses software pays money to Microsoft", then I guess it is. But seriously, the GPL does not restrict you to you if you merely use the software. If you design other programs with it, those other programs are not affected at all by the license. The license restricts you only if you redistribute this software or a modification of it.
Not much, unfortunately. This chapter from my Design & Patterns book contains some useful information.
Please report it using the SourceForge tracker. Attach a sample Violet file and screen shot when appropriate.
Please request it using the SourceForge tracker. If you want a visual enhancement, attach a sample image or a URL where we can see what you want.
Thank you!!! Please submit a patch using the SourceForge tracker.