UML Hierarchy Diagram Generator
This program reads in a text file that describes the properties, methods and inheritance relationship between classes, and then creates a diagram visualising the classes and their inheritance.
About this Project
Unified Modeling Language (UML) is a set of specifications used by software engineers to create diagrams and visually communicate designs of systems. UML can be divided into two categories, behaviour and structural diagrams. This project produces structural diagrams describing the hierarchical structure between classes.
Development Environment
This program in implemented in Java and uses Java's Graphics2D packages for visualisation. It reads and parses the file, first it creates class objects, adds the properties and methods and finally creates the hierarchical structure linking the classes.
To render the model, the top level classes are called to draw. Each class measures it selves and its sub-classes and recursively. A total layout is computed. Then the draw method is invoked which recursively draws each class and then its sub-classes to generate the complete image.
Text wrapping is performed during the layout phase and splits the text into multiple drawable objects.