How davo75/jconverter works
Purpose and Runtime
JConverter is a Java desktop application for converting imperial and metric measurements. It is structured as an MVC-style Swing project, built with Ant/NetBeans metadata under ConverterMVC_v4/build.xml and ConverterMVC_v4/nbproject/.
Application Entry Point
ConverterMVC_v4/src/myconverter/JConverter.java is the likely bootstrap class. It initializes the conversion application and connects the model, controller, and primary UI rather than exposing an HTTP/API entry point.
Conversion Domain Model
ConverterMVC_v4/src/myconverter/JConverterModel.java owns the measurement-conversion logic and associated state. This is the core domain boundary: UI code should provide selected units and values, while the model returns converted values rather than embedding conversion rules in Swing event handlers.
Primary Converter Interface
ConverterMVC_v4/src/myconverter/JConverterView.java and ConverterMVC_v4/src/myconverter/JConverterView.form define the main Swing conversion window. The .form file indicates NetBeans GUI-builder ownership of layout, while the Java class provides the runtime view behavior and widget access.
Control and Event Flow
ConverterMVC_v4/src/myconverter/JConverterController.java mediates between the main view and model. User actions in JConverterView flow to the controller; the controller validates or interprets UI inputs, invokes JConverterModel, and updates displayed conversion results. This is the principal control boundary between presentation and conversion behavior.
Importer UI Boundary
ConverterMVC_v4/src/myconverter/JImporterView.java and ConverterMVC_v4/src/myconverter/JImporterView.form provide a separate Swing screen/dialog for importing data or inputs. Its presence suggests a secondary user workflow distinct from direct one-value conversion; integration with the controller/model should remain explicit rather than allowing the importer to bypass domain logic.
Build and Delivery
The project is an Ant-built Java application with a manifest at ConverterMVC_v4/manifest.mf. Generated classes and build outputs reside under ConverterMVC_v4/build/; authoritative source is under ConverterMVC_v4/src/myconverter/. No external service, database, browser runtime, or server infrastructure is represented in the repository.
Main entry points: JConverterController.java JConverterController · JConverter.java JConverter · JConverterView.java JConverterView · JConverterModel.java JConverterModel
Components 11
Swing desktop app
- JConverter · Initializes and wires the MVC application.
ConverterMVC_v4/src/myconverter/JConverter.java - JConverterView · Collects conversion inputs and displays results.
ConverterMVC_v4/src/myconverter/JConverterView.java - JConverterView.form · GUI-builder layout for the main window.
ConverterMVC_v4/src/myconverter/JConverterView.form - JImporterView · Separate workflow for importing inputs or data.
ConverterMVC_v4/src/myconverter/JImporterView.java - JImporterView.form · GUI-builder layout for the importer UI.
ConverterMVC_v4/src/myconverter/JImporterView.form
MVC conversion core
- JConverterController · Interprets UI actions and updates views from model results.
ConverterMVC_v4/src/myconverter/JConverterController.java - JConverterModel · Owns conversion rules and conversion state.
ConverterMVC_v4/src/myconverter/JConverterModel.java
Build & packaging
- Ant build · Compiles and packages the desktop application.
ConverterMVC_v4/build.xml - NetBeans metadata
- Application manifest
ConverterMVC_v4/manifest.mf - Build output · Generated output; source remains authoritative.
Connections 14
- JConverter → JConverterView: creates
- JConverter → JConverterController: wires
- JConverter → JConverterModel: initializes
- JConverterView.form → JConverterView: defines layout
- JImporterView.form → JImporterView: defines layout
- JConverterView → JConverterController: user actions
- JImporterView → JConverterController: import actions
- JConverterController → JConverterModel: conversion requests
- JConverterModel → JConverterController: converted values
- JConverterController → JConverterView: display updates
- Ant build → Build output: compiles and packages
- NetBeans metadata → Ant build: project integration
- Application manifest → Ant build: package metadata
- Build output → JConverter: contains application classes