1
README
Thibaud edited this page 2026-03-27 15:43:53 +01:00

Reactive Shapes

An interactive Java Swing application for creating, editing, and exporting 2D shapes.

Authors: Alexandre Colicchio and Thibaud Gasser
Artifact: ovh.gasser:shapes:1.0-SNAPSHOT
Package: ovh.gasser.newshapes


Features

  • Shape creation — rectangles, circles, triangles, and text labels
  • Selection — click to select, shift-click for multi-select, drag to draw a selection box
  • Move — drag selected shapes to reposition them on the canvas
  • Resize — toggle resize mode with R to reveal 8 directional handles per shape
  • Color editing — independently set fill and stroke colors on any selection
  • Export — render the canvas to HTML/CSS or SVG
  • Composite shapes — group shapes into named collections and manipulate them as a unit
  • Clone — duplicate the current selection with C

Quick Start

Requirements

  • Java 16 or later
  • Maven 3.6 or later

Build

mvn compile

Run

mvn exec:java -Dexec.mainClass=ovh.gasser.newshapes.App

Test

mvn test

Keyboard Shortcuts

Key Action
R Toggle resize mode
Delete Delete selected shapes
C Clone the current selection
A Randomize colors of selection
H Export canvas to HTML

Documentation Index

Document Description
Architecture Design patterns, MVC structure, class relationships
Shape System Shape hierarchy, attributes, and composite pattern
Visitor & Exporters Visitor pattern, rendering, HTML/SVG export
API Reference Public interfaces and key class reference
Contributing Development setup, build, testing, conventions

Project Status

See the feature roadmap at the repository root for a full list of open and planned work.

Completed

  • Text shapes
  • Resize mode with 8-handle control points

Planned

  • Undo/redo support
  • Save and load canvas state
  • Freeform polygon shapes

Tech Stack

Component Technology
Language Java 16
Build Maven
UI Swing
Logging SLF4J + Logback
Testing JUnit 5