-
Notifications
You must be signed in to change notification settings - Fork 139
Description
According to the UML specification, subjects are part of the Use Case Diagram.
Currently, JetUML does not support subjects.
A subject is represented as a rectangle enclosing use cases and labeled with a name and optional stereotype (e.g., process, subsystem, service).
Design Considerations
Components to Add or Extend
- Add
SubjectNodeSubjectNodeRenderer
- Extend
UseCaseDiagramRendererUseCaseDiagramValidatorPrototypesDiagramType.USECASE
Wireframe
Potential Issues
JetUML currently does not support manual resizing of nodes.
A subject’s visual size should ideally depend on the number of contained use cases.
Possible Solutions
F1: Fixed Size (Dirty)
- Use a static rectangle size for all subjects
- Ensures subjects are never too small, but may appear too large for few use cases
- No API changes required
- Simplest and fastest implementation
Pros
- Minimal code change
- No impact on current resizing model
Cons
- Inefficient use of diagram space
- Poor scalability for complex diagrams
F2: Adjustable Size via Properties (Cleaner)
- Add
WIDTHandHEIGHTproperties toAbstractNode. - User can change size in Properties viewer
- Renderer adapts to these properties.
Pros
- More flexible subject representation
- Backward-compatible default sizes possible
Cons
- Requires renderer adjustments
- Introduces moderate to big API changes
F3: User-Resizable Subjects (Cleanest, Complex)
- Introduce UI-based resizing for nodes
- Extend interaction model and rendering logic
- Similar to graphical frameworks with bounding box manipulation
Pros
- Most intuitive for users
- Fully dynamic diagram layout
Cons
- Major API and UI changes
- Complex to validate and persist
- Requires consistent integration with layout and connector logic
Recommendation
For the initial implementation, F1 (Fixed Size) is sufficient.
It enables basic UML compliance and feature completeness with minimal code changes.
Solutions F2 and F3 can be considered for the future to enhance flexibility and usability.
Further design consinderations follow, if approved and solution (F1, F2, F3) discussed.