Can I create custom UML elements in UMLet?
Updated
Yes. UMLet lets you create your own custom UML elements, and you can do it without leaving the application. The mechanism is unusual: instead of drawing shapes with a mouse, you modify an element's appearance at run time by changing a few lines of Java code, and UMLet compiles that code on the fly. This makes custom elements practical if you are comfortable editing small amounts of code, and unnecessary if you only need standard UML notation.
How custom elements work
UMLet's core design is that elements are defined by text rather than pop-up dialogs. Each element has a text panel where you edit its content using a small markdown-like dialect, and its drawing behavior comes from Java code attached to the element.
For custom elements, the workflow is:
- Take an existing element as a starting point.
- Change a few lines of its Java code to alter how it is drawn.
- UMLet compiles the new code immediately, so the element updates at run time.
- The new element type becomes available to add to your diagrams.
Because the compilation happens inside UMLet, you do not need a separate build step, an external IDE, or a restart to see the result.
Two ways to extend UMLet
There are two distinct levels of customization, and they suit different needs.
| Approach | What you change | Effort | Best for |
|---|---|---|---|
| Modify elements in a palette | Element content and properties via the text panel | Low | Reusing a tweaked element as a new template |
| Write custom UML elements | A few lines of Java code defining how the element is drawn | Moderate | New element types not covered by built-in palettes |
The palette route is the lighter option: you can modify elements inside their palettes and immediately use them as new templates. This lets you tailor UMLet to your modeling needs without writing code, as long as the change can be expressed through the element's text and existing drawing behavior.
The code route is for genuinely new element types. Since an element's look is modified at run time by changing a few lines of Java, you can create and add new element types to your diagrams entirely within UMLet.
What you can model
UMLet supports a range of UML diagram types, so custom elements sit alongside standard notation rather than replacing it:
- Class diagrams
- Use case diagrams
- Sequence diagrams
- State diagrams
- Deployment diagrams
- Activity diagrams
Sequence and activity diagrams can also be created from plain text, which fits the same text-first philosophy as custom elements.
When custom elements are worth it
Custom elements make sense when your modeling needs go beyond what the built-in palettes offer — for example, domain-specific notation, house styles for a team, or repeated diagram patterns you want to standardize as reusable templates.
They are less useful if you only produce standard UML diagrams occasionally. In that case, the built-in elements and the palette-modification route cover most needs, and you avoid maintaining Java code.
One practical note: because custom elements depend on Java code compiled at run time, treat them as part of your modeling setup rather than throwaway tweaks — if you rely on them across projects, keep track of the code you wrote.
Getting the tool
UMLet is described as a free, open-source UML tool. It is available as a stand-alone app for Windows, macOS, and Linux, as an Eclipse plugin, as a web app called UMLetino, and as a Visual Studio Code extension. The current version referenced on the site is UMLet 15.1.