Giter Club home page Giter Club logo

uml-editor's Introduction

Javadoc GitHub release (latest by date)

Quality Gate Status Reliability Rating Lines of Code


Logo

UML Editor

NCU OOAD | Spring 2024 | Final Project
JavaDocs »
DEMO »

UML Editor

Software Requirements

Maven Dependencies

Features

GUI Layout and Buttons

  • Select
  • Association
  • Generalization
  • Composition
  • Class
  • Use Case

Functions

  • Create basic object: Class, UseCase
  • Select/Unselect/Move a single basic object: Class, UseCase
  • Create UMLConnectionLine: AssociationLine, CompositionLine, GeneralizationLine
  • Change Object Name
  • Select/Unselect/Move connection line
  • Select/Unselect a UMLGroup of objects
  • Group/UpGroup
  • Select and Move BaseUMLObject (include Group)

Extra Features

  • Delete UMLObject

Program Flow Overview

Caution

This part will be updated soon.

  1. Click Tool Button
  2. Mode
    1. Create UMLObject
      1. Create UMLConnectionLine
      2. Create UMLBasicObject
    2. Select
      1. If selection is UMLObjects
        1. can Move (UMLConnectionLine movement are not supported yet.)
      2. If selection is UMLBasicObject
        1. can change it’s ObjectName
      3. If selection is an Area including several UMLObjects
        1. can Group
      4. If selection is an UMLGroup
        1. can UnGroup
  3. Canvas Repaint
graph TD
    A[Initialize UML Editor] --> B{Button Clicked}
    B -->|Select| C[Set Select Mode]
    B -->|Association| D[Set Association Mode]
    B -->|Generalization| E[Set Generalization Mode]
    B -->|Composition| F[Set Composition Mode]
    B -->|Class| G[Set Class Creation Mode]
    B -->|Use Case| H[Set Use Case Creation Mode]
    C --> I{Mouse Event on Canvas}
    D --> I
    E --> I
    F --> I
    G --> I
    H --> I
    I -->|Left Click on Object| J[Select/Unselect Object]
    I -->|Left Click on Canvas| K[Unselect All Objects]
    I -->|Left Press on Object| L[Start Line Creation]
    I -->|Mouse Drag| M[Update Line Endpoint]
    I -->|Left Release on Object| N[Create Connection Line]
    I -->|Left Press on Object| O[Start Object Movement]
    I -->|Mouse Drag| P[Move Object]
    I -->|Left Release| Q[Update Object Position]
    J --> R{Edit Menu}
    K --> R
    R -->|Group Selected| S[Merge Selected Objects]
    R -->|Ungroup Selected| T[Decompose Composite Object]
    R -->|Change Object Name| U[Open Name Change Window]
    U -->|OK with New Name| V[Update Object Name]
    U -->|Cancel| W[Close Window]
    V --> W
    W --> I

Usage

You can just download 🌔 v1.0 and run the jar file.

Build

mvn clean package

Run

java -jar target/uml-editor-1.0-jar-with-dependencies.jar

Class Diagram

Tip

Generated by UML class diagrams

Class Diagram

Class Diagram

Class Diagram with Dependency

Class Diagram with Dependency

Future Work

  • Improve code quality. More OO.
  • Documentations: Java API Docs, README.md

Project File Structure

.
|
+---assets
+---docs
+---src
|   +---main
|   |   +---java
|   |   |   \---com
|   |   |       \---xxrjun
|   |   |           |   UMLEditorApplication.java
|   |   |           |
|   |   |           +---components
|   |   |           |   |   Canvas.java
|   |   |           |   |   MenuBar.java
|   |   |           |   |   ToolPanel.java
|   |   |           |   |
|   |   |           |   \---uml
|   |   |           |       |   UMLGroup.java
|   |   |           |       |   UMLObject.java
|   |   |           |       |   UMLPort.java
|   |   |           |       |
|   |   |           |       +---basics
|   |   |           |       |       ClassBasicObject.java
|   |   |           |       |       UMLBasicObject.java
|   |   |           |       |       UseCaseBasicObject.java
|   |   |           |       |
|   |   |           |       \---connectionlines
|   |   |           |               AssociationLine.java
|   |   |           |               CompositionLine.java
|   |   |           |               GeneralizationLine.java
|   |   |           |               UMLConnectionLine.java
|   |   |           |
|   |   |           +---enums
|   |   |           |       EditFunctionTypes.java
|   |   |           |       ToolButtonConfig.java
|   |   |           |       UMLObjectTypes.java
|   |   |           |
|   |   |           +---factories
|   |   |           |       UMLObjectFactory.java
|   |   |           |
|   |   |           \---modes
|   |   |                   CreateBasicUMLObject.java
|   |   |                   CreateUMLConnectionLine.java
|   |   |                   Select.java
|   |   |                   UMLFactory.java
|   |   |                   UMLMode.java
|   |   |
|   |   \---resources
|   |       \---images
...

References

Documentations

Related Projects

Caution

Code similarity will be checked and updated. Expecting to use MOSS

uml-editor's People

Contributors

xxrjun avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

uml-editor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.