d3c993eb2d
test: add HTMLDraftman direct visitor tests
...
CI / build-and-test (pull_request) Successful in 18s
Add 32 tests covering each visit*() method in isolation:
- visitRectangle: div+id, position, dimensions, filled/stroked/both/neither
- visitCircle: div+class, border-radius prefixes, position, id consistency
- visitTriangle: div+class, CSS border trick, position, fill color,
regression test for hashCode mismatch (this.hashCode vs shape.hashCode)
- visitText: content, id consistency, position, font attrs, color, nowrap,
null color fallback
- visitCollection: empty, multiple children, nested
- generateHTML: DOCTYPE, structure, stylesheet ref, shape content
Closes #10
2026-03-27 17:02:17 +00:00
bcbbcef321
Add SelectionAttributes unit tests
...
CI / build-and-test (pull_request) Successful in 19s
Test core data type for selected/unselected state, default values,
ID constant, interface compliance, and instance independence.
8 tests covering all public API of SelectionAttributes.
Closes #6
2026-03-27 16:56:45 +00:00
e83a6ba7d1
test: add ColorAttributes unit tests
...
CI / build-and-test (pull_request) Successful in 18s
Add 16 tests covering constructor behavior, fill/stroke flags and colors,
null color handling, ID constant, Attributes interface, toString output,
and instance independence.
Closes #7
2026-03-27 17:51:13 +01:00
7ddef4d8ab
Add parameterized ShapeContractTest for Shape interface invariants
...
CI / build-and-test (pull_request) Successful in 18s
Verify clone(), getBounds(), and translate() contracts across all Shape
implementations (SRectangle, SCircle, STriangle, SText, SCollection)
using @ParameterizedTest + @MethodSource.
Also adds junit-jupiter-params dependency to pom.xml.
Closes #8
2026-03-27 16:11:55 +00:00
ba37b199de
fix(html): fix hashCode for triangle
...
The bug caused HTML class and CSS selector to have different IDs, breaking triangle rendering.
2026-03-27 16:39:10 +01:00
da70c9f568
test: add HTML and SVG exporter unit tests
...
- Add HTMLExporterTest covering HTML structure, rectangle/circle div generation,
empty and nested collections, and constructor
- Add SVGExporterTest covering SVG structure, rectangle/circle elements,
color attributes, nested collections, and constructor
2026-03-27 14:29:38 +01:00
211f15658b
test: add core unit tests
...
- Add JUnit 5 Jupiter dependencies to pom.xml
- Add maven-surefire-plugin for test execution
- Add AbstractShapeTest for base class methods
- Add SCircleTest, SRectangleTest, STriangleTest, STextTest
Tests cover: creation, bounds, clone, resize (AbstractShape)
2026-03-27 14:24:25 +01:00
b0e3428696
feat(ui): add box selection feature
...
- Selection: add addAll() method for bulk shape addition
- Controller: box selection with mouse drag on empty space
- ShapeDraftman: drawSelectionBox() for rubber-band rendering
- ShapesView: currentSelectionBox field and setter
2026-03-26 23:56:01 +01:00
3a6f98455a
fix: fix resize and dragging
...
- AbstractShape: make bounds protected for subclass access
- STriangle: refactor resize logic
- SCircle: refactor resize logic (preserves equal dimensions)
- SText: add reasonable default bounds for hit testing
2026-03-26 23:55:38 +01:00
fcd68be51b
Fix bugs: stroke condition, logging typo, NPE in clone(), mutable bounds
2026-03-19 22:32:53 +01:00
b34ad6a2e4
implement resize feature
2026-03-19 22:32:49 +01:00
f8a6d786ee
feat: implement SText shape
2026-03-19 21:45:54 +01:00
f424735a7b
Add STriangle
2026-03-19 20:03:28 +01:00
b8ecf9859b
Implement SVG export
2026-03-19 19:06:12 +01:00
ad45eddbf5
fix confusion between circle radius and diameter
...
classic shite
2026-03-19 19:05:12 +01:00
dd59c7d51a
sync edit menu checkbox state with the selected shape
2026-03-19 16:29:56 +01:00
ce6d0b0815
fix drag of multiple selected shapes with shift
2026-03-19 14:51:12 +01:00
02dd84c1f4
handle multiple selection with shift
2025-02-19 13:44:23 +01:00
5f0bcda8ba
Import menu items from original project
2025-02-19 12:57:48 +01:00
75bd5997df
add menubar
2025-02-19 12:15:39 +01:00
55e74b5e4b
Add HTML export action
2025-02-19 11:45:32 +01:00
1b0284cb4d
Add change color action
2025-02-19 11:39:50 +01:00
aea90f5a93
Implement copy action
2025-02-19 11:27:45 +01:00
b4eac668c8
Add delete shape operation
2025-02-19 10:50:27 +01:00
98b05e435e
Add SCircle
2019-03-19 21:56:00 +01:00
5be59b37f0
Avoid use of try-catch as control flow
2019-03-19 21:37:11 +01:00
51885d8c53
Base java event POC
2019-03-19 21:29:26 +01:00